erikras / erikras/react-redux-universal-hot-example
clean-webpack-plugin prevents zero downtime build
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, first of all thanks for this inspiring repo. I'm having trouble with the webpack production config. As far as I know, `clean-webpack-plugin` cleans the distribution directory before each build. This prevents zero downtime build, as on each build and until the app restarts there will be time when the javascript files are inaccessible due to the unfinished build.
On my deployment flow, I pull the latest changes from my git repo and build it on the production server. I know this takes time, but I must do this because I depend on the environment variables present on my prod server.
For now I disabled `clean-webpack-plugin` from my prod config, works like a charm, but it also means that my dist directory will be filled with outdated build artifacts. Any suggestions on this? Do I misunderstand something? Or should I modify my deployment flow?
Contributor guide
Assessment
This issue has not been assessed yet.