devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 3000
},
配置麻烦,建议在package.json里scripts里增加,示例如下:
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"dev": "webpack-dev-server --open --contentBase src --hot"
},
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 3000
},
配置麻烦,建议在package.json里scripts里增加,示例如下:
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"dev": "webpack-dev-server --open --contentBase src --hot"
},