Skip to content

Commit

Permalink
chore(webpack): stop watching node modules in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jailln committed Jan 24, 2024
1 parent f707e26 commit 83a308d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const debugBuild = mode === 'development';
- we also dynamise the value of __DEBUG__ according to the env var
*/
// Note that we don't support .babelrc in parent folders
var babelrc = fs.readFileSync(path.resolve(__dirname, '.babelrc'));
var babelConf = JSON.parse(babelrc);
const babelrc = fs.readFileSync(path.resolve(__dirname, '.babelrc'));
const babelConf = JSON.parse(babelrc);

babelConf.babelrc = false; // disabel babelrc reading, as we've just done it
const replacementPluginConf = babelConf.plugins.find(plugin => Array.isArray(plugin) && plugin[0] === 'minify-replace');
Expand Down Expand Up @@ -88,11 +88,11 @@ module.exports = () => {
publicPath: '/dist/',
},
static: {
directory: path.resolve(__dirname, './'),
watch: {
ignored: path.resolve(__dirname, '.git')
}
},
directory: path.resolve(__dirname, './'),
watch: {
ignored: [path.resolve(__dirname, '.git'), path.resolve(__dirname, 'node_modules')],
},
},
client: {
overlay: {
errors: true,
Expand Down

0 comments on commit 83a308d

Please sign in to comment.