The repository is created to demonstrate a potential bug in the latest version of webpack-dev-server (v3.4.1 at the time of writing). This version ignores changes in node_modules, and does not trigger a new compilation. Whereas, when the webpack-dev-server dependency is pinned to 3.3.1, it works.
- Clone this repo.
- Do
npm iin themainfolder. Main has a dependency on theservicepackage, included inmainvia a direct tarball dependency toservice/service-1.0.0.tgz. - Do
npm startinmain. This should start thewebpack-dev-server. - Go to
main/node_modules/service/index.js, and make some change. - The
webpack-dev-serverdoes not trigger a build.
You may stop the process, pin the webpack-dev-server to 3.3.1, and repeat the the process to verify that the earlier version worked.
Link to the issue: webpack/webpack-dev-server#1934