小编Pat*_*Pat的帖子

如何通过修改 vue.config.js 创建多页 Vue.js 应用程序,其中包含嵌套子目录上的页面?

我有一个多页 Vue.js 应用程序,其中包含有关域/法律的工作页面;域/提交;等等。我在 Vue.js页面的帮助下实现了它(即定制vue.config.js

换句话说,我很好地完成了上述工作。

我现在正在尝试在新的子目录级别下实现更多的嵌套页面(除了上面我已经拥有的页面)。IE

  • 域/组织/配置文件 1
  • 域/组织/配置文件 2
  • 域/组织/配置文件 3

有什么办法可以通过自定义来完成这项工作vue.config.js

当前尝试vue.config.js代码:

module.exports = {
  pages: {
    index: {
      entry: "./src/pages/home/main.js",
      template: "public/index.html",
      title: "Home",
      chunks: ["chunk-vendors", "chunk-common", "index"],
    },
    legal: {
      entry: "./src/pages/legal/main.js",
      template: "public/index.html",
      title: "Legal",
      chunks: ["chunk-vendors", "chunk-common", "legal"],
    },
    submit: {
      entry: "./src/pages/submit/main.js",
      template: "public/index.html",
      title: "Submit",
      chunks: ["chunk-vendors", "chunk-common", "submit"],
    },
    org: {
      digitalocean: {
        entry: "./src/pages/org/digitalocean/main.js",
        template: "public/index.html",
        title: "Digital Ocean",
        chunks: ["chunk-vendors", "chunk-common", …
Run Code Online (Sandbox Code Playgroud)

multipage vue.js vue-cli multi-page-application vue-cli-3

6
推荐指数
1
解决办法
763
查看次数