1. Change the code of our project from es6 -> es5 [babel]
Reference: http://babeljs.io/docs/setup/#installation
1.1. Install package babel-core babel-loader babel-preset-env
1.2, configure in the loader
see code
1.3. Create a .babelrc configuration file in the root directory of the project and write the presets code
see code
2. Set it up as a production environment
Reference: https://cn.vuejs.org/v2/guide/deployment.html
3. Compression
Reference: https://cn.vuejs.org/v2/guide/deployment.html
https://github.com/jantimon/html-webpack-plugin
包:babel-core babel-loader babel-preset-env
Reference scene: Convert the code in our project to es5 code
Installation method: cnpm i babel-core babel-loader babel-preset-env -D