separate vue pages option into multiple files

Solutions on MaxInterview for separate vue pages option into multiple files by the best coders in the world

showing results for - "separate vue pages option into multiple files"
Jefferson
08 Mar 2019
1related-pages.js
2
3module.exports = {
4	relatedPageOne : {
5    	entry: 'src/somewhere/main.js',
6        template: 'public/index.html',
7        filename: 'somewhere/relatedPageOne.html',
8        title: 'Related Page One'
9    },
10	relatedPageTwo : {
11    	entry: 'src/somewhere-else/main.js',
12        template: 'public/index.html',
13        filename: 'somewhere-else/relatedPageTwo.html',
14        title: 'Related Page Two'
15    },
16}
17
18
19vue.config.js
20const RELATED_PAGES = require('related-pages.js');
21const RELATED_PAGES2 = require('related-pages2.js');
22
23module.exports = {
24	...,
25    pages:{
26      ...RELATED_PAGES,
27      ...RELATED_PAGES2,
28    }
29}
similar questions