标签:build conf 安装插件 html ons install class output model
1.webpack.config.js中导入
const HtmlWebpackPlugin = require(‘html-webpack-plugin‘)
2.pulgin中新增
new HtmlWebpackPlugin({
template:‘index.html‘
})
3.需要删除output中的如下语句
publicPath: ‘dist/‘
4.index中的如下语句
<script type="text/javcascript" src="bundle.js"></script>
6.安装插件
npm install html-webpack-plugin@3.2.0 --save-dev
7.运行
npm run build
webpackPlugin处理index.html到dist
标签:build conf 安装插件 html ons install class output model
原文地址:https://www.cnblogs.com/ajaXJson/p/14912824.html