forked from WoWAnalyzer/WoWAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
23 lines (21 loc) · 1.01 KB
/
config-overrides.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { override, disableEsLint } = require('customize-cra');
// eslint-disable-next-line import/no-extraneous-dependencies
// const EslintPlugin = require('eslint-webpack-plugin');
// eslint-disable-next-line import/no-extraneous-dependencies
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
// Enable when we upgrade to CRA v4:
// // customize-cra's disableEsLint disables the rules, but disabling the entire
// // plugin seem to give us more performance.
// const disableEsLint = () => (config) => ({
// ...config,
// plugins: config.plugins.filter((plugin) => !(plugin instanceof EslintPlugin)),
// });
const disableTypeChecking = () => (config) => ({
...config,
plugins: config.plugins.filter((plugin) => !(plugin instanceof ForkTsCheckerWebpackPlugin)),
});
module.exports = override(
process.env.DISABLE_AUTOMATIC_ESLINT && disableEsLint(),
process.env.DISABLE_AUTOMATIC_ESLINT && disableTypeChecking(),
// addBabelPlugin('babel-plugin-transform-typescript-metadata'),
);