aboutsummaryrefslogtreecommitdiff
path: root/modern/craco.config.js
blob: c59859512c738d96db4cbb9c8f321a21ac112572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module.exports = {
  devServer: {
    watchOptions: {
      ignored: /\.#|node_modules|~$/,
    },
  },
  webpack: {
    configure: (webpackConfig) => {
      const scopePluginIndex = webpackConfig.resolve.plugins.findIndex(
        ({ constructor }) => constructor && constructor.name === 'ModuleScopePlugin',
      );

      webpackConfig.resolve.plugins.splice(scopePluginIndex, 1);
      return webpackConfig;
    },
  },
};