[文档](https://www.webpackjs.com/)
~~~
npm init -y
npm i webpack webpack-cli -g
npm i webpack webpack-cli --save-dev
//打包
webpack
~~~
## plugins
~~~
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin()]
};
~~~
~~~
npm i html-webpack-plugin --save-dev
~~~