webpack
clean-webpack-plugin
多页、jQuery、图片转base64、压缩混淆、异步模块加载的项目
cheap-module-eval-source-map方法构建速度更快,但是不利于调试,推荐在大型项目考虑时间成本时使用。
安装webpack
npm run build npm install sass-loader node-sass extract-text-webpack-plugin css-loader style-loader --save-dev npm install file-loader image-webpack-loader cnpm install webpack -g cnpm install -D webpack-cli webpack4.0将webpack-cli移出成为单独模块 webpack本身只处理javascript模块,要处理其它文件,需要loader进行转换 cnpm install css-loader style-loader