html-webpack-plugin property at github View
Html html files generated by the module
1. Plug
cnpm i html-webpack-plugin --save-dev
After the installation finished there will be a warning:
do not install webpack installed directly in the project once on OK
cnpm i webpack --save-dev
Such installation is complete
2. Plug
// 引入模块
let HtmlWebpackPlugin = require("html-webpack-plugin")
plugins:[new htmlWebpackPlugin({
//filename: 相对输出文件的的路径
filename:'./index.html',
//template: 模板为相对当前的配置文件路径
//相对webpack.config.js 的路径
template:'index.html'
})
]
Re-packaged once the ok
**
注意
**
Before using the resources we have to set an access path publicPath
so as to re-set the path packaged generated html file with respect .