首页 > 解决方案 > Vue - 如何自定义到 vue.config.js 中定义的页面的路由?

问题描述

给定具有此设置的 vue.config.js 文件

pages: {
    index: {
        entry: 'src/main.js',
        template: 'public/index.html',
        filename: 'index.html'
    },
    otherpage: {
        entry: 'src/other.js',
        template: 'public/otherpage.html',
        filename: 'otherpage.html'
    }
}

我知道我可以使用这个 url: 导航到 otherpage.html 模板domain/otherpage.html,但是如何使用类似的 url 访问它domain/other

任何帮助表示赞赏,谢谢!

标签: vue.js

解决方案


推荐阅读