~cytrogen/masto-fe

ref: 99c72830bc8c426a12c3f5dc4eabff1ece99eac4 masto-fe/config/webpack/rules/babel.js -rw-r--r-- 573 bytes
99c72830 — Claire [Glitch] Fix scroll position in thread view reseting when closing a modal 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { join, resolve } = require('path');

const { env, settings } = require('../configuration');

module.exports = {
  test: /\.(js|jsx|mjs|ts|tsx)$/,
  include: [
    settings.source_path,
    ...settings.resolved_paths,
  ].map(p => resolve(p)),
  exclude: /node_modules/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        sourceRoot: 'app/javascript',
        cacheDirectory: join(settings.cache_path, 'babel-loader'),
        cacheCompression: env.NODE_ENV === 'production',
        compact: env.NODE_ENV === 'production',
      },
    },
  ],
};