~cytrogen/masto-fe

ref: 713d217384fdb14dda44c3277f5a9ae4e389e4e2 masto-fe/config/webpack/rules/babel.js -rw-r--r-- 534 bytes
713d2173 — dependabot[bot] Bump eslint from 8.39.0 to 8.40.0 (#24919) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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: {
        cacheDirectory: join(settings.cache_path, 'babel-loader'),
        cacheCompression: env.NODE_ENV === 'production',
        compact: env.NODE_ENV === 'production',
      },
    },
  ],
};