Skip to content

Commit

Permalink
Disable cache in dev mode
Browse files Browse the repository at this point in the history
This makes sure that npm run watch will continue to update if a npm linked dependency changes

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored Aug 10, 2022
1 parent 21abb30 commit 520a430
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ module.exports = {
},
},

cache: !isDev,

optimization: {
chunkIds: 'named',
splitChunks: {
Expand Down

2 comments on commit 520a430

@pulsejet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliushaertl is this necessary? This makes the incremental build go from ~800ms to 10s (!) for me. Can't you just restart webpack if a dependency changes, unless I'm missing something.

@skjnldsv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I kida agree, this is a bit over the top! 🙈

Please sign in to comment.