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' }), ]