Skip to content

Commit

Permalink
* Add watch external file plugin in dev mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Oct 3, 2023
1 parent d510f9e commit 07da6d0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -152,4 +147,14 @@ const config = {
target: 'electron-renderer',
}

if (isDevMode) {
config.plugins.push(
new WatchExternalFilesPlugin({
files: [
'./static/locales/*.yaml',
],
}),
)
}

module.exports = config

0 comments on commit 07da6d0

Please sign in to comment.