vue.config里可以配置多页面应用module.exports = {
// publicPath: process.env.NODE_ENV === 'production'
// ? 'https://dev-cdp.cn-siit.com/'
// : '', // http://bri-e.cn-siit.com/cdp/#/tags-manage 用 /cdp/dist/
publicPath: './',
outputDir: 'dist',
assetsDir: '',
pages: {
index: {
// page 的入口
entry: 'src/main.js',
// 模板来源
template: 'public/index.html',
// 在 dist/index.html 的输出
filename: 'index.html', // ../../../module/dmp/views/dmp/index_cdp.twig index.html
// 当使用 title 选项时,
// template 中的 title 标签需要是
title: 'Index Page',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
home: {
// page 的入口
entry: 'src/home/main.js',
// 模板来源
template: 'public/home.html',
// 在 dist/index.html 的输出
filename: 'home.html', // ../../../module/dmp/views/dmp/index_home.twig home.html
// 当使用 title 选项时,
// template 中的 title 标签需要是
title: 'dashboard Page',
// 在这个页面中包含的块,默认情况下会包含
// 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'home']
}
}
}