[Vuejs]-Vue config for multiple html files

4๐Ÿ‘

โœ…

if you use vue-cli, you can set config in vue.config.js file to support for multiple html files:

 const config = {
    devServer: {
        open: true,
        disableHostCheck: true,
    },
    pages: {
        index: {
            entry: 'src/index.js',
            template: 'public/index.html',
            filename: 'index.html',
        },
        support: {
            entry: 'src/support.js',
            template: 'public/support.html',
            filename: 'support.html',
        },
    },
    // ...config code
}
module.exports = config

refer to link, Build the app in multi-page mode

thanks.

๐Ÿ‘คJing Jiang

Leave a comment