Based on vue-cli's webpack templates
- Create
XXX.entry.js
undersrc
folder, as new Page's entry - Create
XXX.html
under the project as template, eg.pageA.html
- Write configuration in the
pages.js
file. For expample:
pages.js
:
'use strict'
module.exports = [
{
name: 'pageA', // name for vendor chunk
entry: 'pageA.entry.js', // pageA's entry file
filename: 'pageA.html', // The file to write the HTML. Please see "html-webpack-plugin"
template: 'pageA.html', // Webpack require path to the template. Please see "html-webpack-plugin"
},
{
name: 'pageB',
entry: ['pageB.entry.js'],
filename: 'pageB.html',
template: 'pageB.html'
},
//Add your pages
]