vue打包index.html

vue打包index.html

1.安装插件

npm install html-webpack-plugin --save-dev

2.配置webpack.config.js

在第一行写上

const HtmlWebpackPlugin = require("html-webpack-plugin")

在module里面配置

  plugins: [
    new VueLoaderPlugin(),
		new HtmlWebpackPlugin({
    
    
			template:'index.html'
		}),
  ]

猜你喜欢

转载自blog.csdn.net/qq_44255146/article/details/115384667