Answers for "separate vue pages option into multiple files"

0

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,
    }
}
Posted by: Guest on March-04-2021

Code answers related to "separate vue pages option into multiple files"

Code answers related to "Javascript"

Browse Popular Code Answers by Language