才webpack开发前端,刷新页面提示:Uncaught Error: [HMR] Hot Module Replacement is disabled,页面中的内容没有渲染出来,哪位高手看看?server.js脚本如下:
var webpack = require("webpack")
var webpackDevServer=require("webpack-dev-server")
var config = require("./webpack.config.js");
config.entry.unshift("webpack-dev-server/client?http://localhost:8080", "webpack/hot/dev-server","./src/main.js");
var compiler = webpack(config);
var server = new webpackDevServer(compiler, {
publicPath: "http://localhost:8080/dist/",
hot: true,
quiet: true,
noInfo: false,
filename: "build.js",
historyApiFallback: false,
stats: { colors: true },
proxy: {
"/test/*": {
target:"http://localhost:8088",
secure: false,
}
},
watchOptions: {
aggregateTimeout: 300,
poll: true
}
});
server.listen(8080);
webpack的配置里面加这个了吗?