升级webpack4 先删除之前的webpack
1 | npm i -D webpack webpack-cli webpack-dev-server |
build/base.conf.js
1 | const os = require('os') //node OS模块 可查看主机系统相关信息 |
build/dev.conf.js
1 |
|
pluguin
1 | npm i -D happypack html-webpack-plugin clean-webpack-plugin progress-bar-webpack-plugin yargs-parser friendly-errors-webpack-plugin portfinder webpack-merge extract-text-webpack-plugin@next optimize-css-assets-webpack-plugin uglifyjs-webpack-plugin chalk rimraf |
babel-loader
1 | npm i babel-loader @babel/cli @babel/core @babel/ @babel/preset-env plugin-proposal-class-properties @babel/ plugin-proposal-decorators @babel/ plugin-syntax-dynamic-import @babel/plugin-transform-classes @babel/plugin-transform-runtime -D |
1 | npm i --save @babel/runtime @babel/runtime-corejs2 |
.babelrc
1 | { |
build/prod.conf.js
1 |
|
build.js
1 |
|