erikras / erikras/react-redux-universal-hot-example

clean-webpack-plugin prevents zero downtime build

Open
#1,093 2 comments 2 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.