From 83a308d226361538212b454293e14f1131836621 Mon Sep 17 00:00:00 2001 From: Vincent JAILLOT Date: Wed, 24 Jan 2024 11:53:33 +0100 Subject: [PATCH] chore(webpack): stop watching node modules in dev mode --- webpack.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index a20964b16f..0bdd1ac891 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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'); @@ -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,