vue split production into multiple files code example
Example: separate vue pages option into multiple files
related-pages.js
module.exports = {
relatedPageOne : {
entry: 'src/somewhere/main.js',
template: 'public/index.html',
filename: 'somewhere/relatedPageOne.html',
title: 'Related Page One'
},
relatedPageTwo : {
entry: 'src/somewhere-else/main.js',
template: 'public/index.html',
filename: 'somewhere-else/relatedPageTwo.html',
title: 'Related Page Two'
},
}
vue.config.js
const RELATED_PAGES = require('related-pages.js');
const RELATED_PAGES2 = require('related-pages2.js');
module.exports = {
...,
pages:{
...RELATED_PAGES,
...RELATED_PAGES2,
}
}