You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launch webpack in watch mode: the dist folder is populated with only one main.*.js file.
Change src/index.js introducing a syntax error.
Result: the dist folder now has two main.*.js files.
Expected result: the old file is cleaned an only the newest version remains.
Workaround
Remove the following lines from the plugin source code:
/** * Do nothing if there is a webpack error */if(stats.hasErrors()){if(this.verbose){// eslint-disable-next-line no-consoleconsole.warn('clean-webpack-plugin: pausing due to webpack errors');}return;}
The text was updated successfully, but these errors were encountered:
Preventing file deletion can be useful in some cases. However, I think that we should have an option to enable/disable this feature. Because in some case this is more annoying than useful.
The plugin does nothing (does not remove the old files) when there is an error in the build. I think this is a bug.
Steps to reproduce:
webpack.config.js
:src/index.js
with no errors.dist
folder is populated with only onemain.*.js
file.src/index.js
introducing a syntax error.Result: the
dist
folder now has twomain.*.js
files.Expected result: the old file is cleaned an only the newest version remains.
Workaround
Remove the following lines from the plugin source code:
The text was updated successfully, but these errors were encountered: