webpack优化

开发阶段

1 开启多核压缩JS
  uglifyjs-webpack-plugin

2 兼容面板-webpack速度显示
  speed-measure-webpack-plugin

3 开启通知面板
  webpack-build-notifier

4 开启打包进度
  progress-bar-webpack-plugin

5 开发面板更清晰
  webpack-dashboard

6 开启窗口的标题
  node-bash-title

上线阶段

1.es6不需要编译

2.前端缓存负载
  webpack-manifest-plugin

3.真正的loading

1
2
3
4
5
new HtmlWebpackPlugin({
loading:{
html: '加载中......'
}
})

```html
 <%= htmlWebpackPlugin.options.loading.html %> 
``` 

4.分析打包结果
  bundlesize
  webpack-chart

5.文件压缩
  uglifyjs-webpack-plugin
  webpack-parallel-uglify-plugin

6.happypack

7.devtool

8.cache-loader