diff --git a/_scripts/webpack.renderer.config.js b/_scripts/webpack.renderer.config.js index c0024e0bfae20..357ea20be6f32 100644 --- a/_scripts/webpack.renderer.config.js +++ b/_scripts/webpack.renderer.config.js @@ -130,11 +130,6 @@ const config = { filename: isDevMode ? '[name].css' : '[name].[contenthash].css', chunkFilename: isDevMode ? '[id].css' : '[id].[contenthash].css', }), - new WatchExternalFilesPlugin({ - files: [ - './static/locales/*.yaml', - ], - }), ], resolve: { alias: { @@ -152,4 +147,14 @@ const config = { target: 'electron-renderer', } +if (isDevMode) { + config.plugins.push( + new WatchExternalFilesPlugin({ + files: [ + './static/locales/*.yaml', + ], + }), + ) +} + module.exports = config