Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional route is being generated for layout file #113

Closed
bux opened this issue Nov 14, 2021 · 3 comments
Closed

Additional route is being generated for layout file #113

bux opened this issue Nov 14, 2021 · 3 comments

Comments

@bux
Copy link

bux commented Nov 14, 2021

Using vitesse with
vite-plugin-pages: "^0.18.2"
vite-plugin-md: "0.11.4"
vite-plugin-vue-layouts: 0.5.0

When accessing the route inside a markdown file in an index route case (that has children in a folder with the same name), I get a list of two possible matches for said route:

[
  {
    "path": "/test",
    "meta": {},
    "props": {
      "default": false
    },
    "children": [
      {
        "path": "",
        "children": [
          {
            "name": "test-test1",
            "path": "test1",
            "props": true
          },
          {
            "name": "test-test2",
            "path": "test2",
            "props": true
          }
        ],
        "props": true
      }
    ],
    "instances": {
      "default": {}
    },
    "leaveGuards": {
      "Set(0)": []
    },
    "updateGuards": {
      "Set(0)": []
    },
    "enterCallbacks": {},
    "components": {
      "default": {
        "__hmrId": "39336072",
        "__file": "E:/docs/src/layouts/default.vue"
      }
    }
  },
  {
    "path": "/test",
    "meta": {},
    "props": {
      "default": true
    },
    "children": [
      {
        "name": "test-test1",
        "path": "test1",
        "props": true
      },
      {
        "name": "test-test2",
        "path": "test2",
        "props": true
      }
    ],
    "instances": {
      "default": {
        "frontmatter": {
          "meta": []
        }
      }
    },
    "leaveGuards": {
      "Set(0)": []
    },
    "updateGuards": {
      "Set(0)": []
    },
    "enterCallbacks": {},
    "components": {
      "default": {
        "__hmrId": "2ad13f07",
        "__file": "E:/docs/src/pages/test.md"
      }
    }
  }
]
@hannoeru
Copy link
Owner

hannoeru commented Nov 14, 2021

Can you open issue in vite-plugin-vue-layouts?

@bux
Copy link
Author

bux commented Nov 14, 2021

Sure :)

@hannoeru
Copy link
Owner

hannoeru commented Jan 8, 2022

This is because vite-plugin-vue-layout wrap each route to layout component, so there will be two component point to the same route, not related to this plugin.

@hannoeru hannoeru closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants