我有一个非常简单的项目:的WebPack-DEV-服务器为旧文件内容
appdir +- app +- main.js +- build +- bundle.js +- index.html +- webpack.config.js
的webpack.config.js:
var path=require("path");
module.exports = {
entry: path.resolve(__dirname, "./app/main.js"),
output: {
path: path.resolve(__dirname, "build"),
filename: "bundle.js"
}
};
我姓张后main.js
,webpack- dev-server看起来像是检测到更改并执行bundle.js
的重新绑定,但浏览器仍然收到旧内容main.js
。
我开始通过执行webpack-dev-server webpack.config.js
任何想法的服务器?