Skip to content

Make webpack-dev-server process more resilient when switching branches.

username-removed-636429 requested to merge 30678-improve-dev-server-process into master

What does this MR do?

Improves the webpack-dev-server process in two ways:

  1. When a module is found missing (usually because we switched branches and haven't run yarn install yet) it will watch node_modules for changes so that a subsequent yarn install will allow the bundle to compile correctly. Previously this would require stopping and restarting the dev server process.

  2. When a change is made to webpack.config.js the webpack-dev-server process will be automatically restarted. This is especially useful when webpack is running alongside other processes like redis and postgresql and restarting webpack would otherwise mean restarting all of them. Idea inspired from this webpack-dev-server issue.

Screenshots (if relevant)

Before:

(after switching branches; not resolved by yarn install)

Screen_Shot_2017-04-09_at_8.51.53_PM

After:

(recompile triggered by yarn install) 🙂

Screen_Shot_2017-04-09_at_9.13.37_PM

(when webpack.config.js changes)

Screen_Shot_2017-04-10_at_1.23.53_AM

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #30678 (closed)

Merge request reports