在 vue.config.js 文件中,可以使用配置项 pages
来设置页面打包后的位置。
语法如下:
module.exports = {
pages: {
index: {
entry:'src/main.js',
template: 'public/index.html',
filename: 'index.html',
},
},
}
上述配置将会把src/main.js
作为入口文件,使用public/index.html
作为模板,打包后生成的文件名是index.html
。
更多详细信