1、拆开base和各环境的配置,通过merge进行合并
2、热更新,起来老是白屏,加了个插件,把路径重新写了一下
entry: './src/main.js',
output: {
path: path.resolve(__dirname, 'dist'),
publicPath: '/',
filename: 'build.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
// package.json
webpack-dev-server --hot --inline --progress --config build/webpack.dev.config.js
网友评论