New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Change cleanupOutputBeforeBuild() to use beforeEmit:true for later deleting #469
Comments
Not sure if that's still an issue but the person that added this option recommended not to use it in dev here: johnagan/clean-webpack-plugin#67 (comment) |
Hey Ryan, guy from symfonycon here :), I just tried setting beforeEmit in webpack.config.js:
It's working as i'd expect it in dev and production (no more "missing manifest.json"), but it's a very minimalistic project. I'll make some more tests soon and maybe give my "swap" approach a shot. If it is a problem in dev context one might use Nabil |
Hey Nabil! Thanks for checking it out! Make sure to also try dev-server - there was some indication that there may be a problem with that, but the details were vague. Thanks for following up on this :). |
On a similar note, if the build fails, the output folder will also be cleaned. In the latest release of |
The https://github.com/johnagan/clean-webpack-plugin has a
beforeEmit
option that default to false. When this is true, it deletes the files later - right before emit. This means that the time between when the files are deleted and recreated is much smaller.I think we should change this to be the default behavior. For some deploys, deleting the old files at the beginning means that their production site is missing the files until the build finishes. Probably those deploy systems could be made better - but
beforeEmit
also seems like a better way to do things in general.The text was updated successfully, but these errors were encountered: