Make webpack-dev-server process more resilient when switching branches.
What does this MR do?
Improves the webpack-dev-server process in two ways:
-
When a module is found missing (usually because we switched branches and haven't run
yarn install
yet) it will watchnode_modules
for changes so that a subsequentyarn install
will allow the bundle to compile correctly. Previously this would require stopping and restarting the dev server process. -
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
)
After:
(recompile triggered by yarn install
)
(when webpack.config.js
changes)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - Tests
-
All builds are passing
-
-
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #30678 (closed)