首页 > 其他 > 详细

vue-cli4 多页配置

时间:2021-04-02 11:12:55      阅读:24      评论:0      收藏:0      [点我收藏+]
module.exports = {
    pages: {
        index: {
            // page 的入口
            entry: ‘src/main.js‘,
            // 模板来源
            template: ‘public/index.html‘,
            // 在 dist/index.html 的输出
            filename: ‘index.html‘,
            // 当使用 title 选项时,
            // template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
            title: ‘Index Page‘,
            // 在这个页面中包含的块,默认情况下会包含
            // 提取出来的通用 chunk 和 vendor chunk。
            chunks: [‘chunk-vendors‘, ‘chunk-common‘, ‘index‘]
        },
        main: {
            // page 的入口
            entry: ‘src/main1.js‘,
            // 模板来源
            template: ‘public/index.html‘,
            // 在 dist/index.html 的输出
            filename: ‘main.html‘,
            // 当使用 title 选项时,
            // template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
            title: ‘main Page‘,
            // 在这个页面中包含的块,默认情况下会包含
            // 提取出来的通用 chunk 和 vendor chunk。
            chunks: [‘chunk-vendors‘, ‘chunk-common‘, ‘main‘]
        }
    }
};

 

vue-cli4 多页配置

原文:https://www.cnblogs.com/little-oil/p/14609346.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!