-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
- Operating System: Windows (Server 2019)
- Node Version: 10.15.0
- NPM Version: 6.4.1
- webpack Version: 4.32.2
- webpack-dev-server Version: 3.4.1
- This is a bug
- This is a modification request
Code
// main/webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const baseUrl = "/";
/** @type {() => import("webpack").Configuration} */
module.exports = () => ({
plugins: [
new HtmlWebpackPlugin({
template: "index.ejs",
metadata: { baseUrl }
})
]
})
// main/src/index.js
const {Service} = require("service"); // a dependency from a local node module
const div = document.createElement("div");
div.innerText = new Service().method();
document.querySelector("body").appendChild(div);
Expected Behavior
When any changes occur in the node_modules
, webpack-dev-server
should trigger a new build.
Actual Behavior
It is not happening after I upgraded to the latest [email protected]
. With the earler version of 3.3.1
it was working perfectly. If the fix is non-trivial, are there better workarounds rather than pinning the version?
For Bugs; How can we reproduce the behavior?
I have created the repo https://github.com/Sayan751/webpack-reloading-issue to demonstrate this problem. The steps to reproduce the problem is detailed there.
For Features; What is the motivation and/or use-case for the feature?
Garethp