kitbagjs / router

A type safe router for vuejs
https://router.kitbag.dev
MIT License
173 stars 4 forks source link

make path optional #227

Closed stackoverfloweth closed 2 months ago

stackoverfloweth commented 2 months ago

Not sure why it took this long but I think path should have always been optional. This felt especially true when defining parent routes, or external routes

createExternalRoutes([
  {
    host: 'https://kitbag.dev',
    path: '',
    children: createExternalRoutes([
      {
        name: 'foo',
        path: 'child',
      },
    ]),
  },
])

After this PR, path behaves like query. It's never required and when omitted is assumed to be an empty string.

createExternalRoutes([
  {
    host: 'https://kitbag.dev',
    children: createExternalRoutes([
      {
        name: 'foo',
        path: 'child',
      },
    ]),
  },
])
netlify[bot] commented 2 months ago

Deploy Preview for kitbag-router ready!

Name Link
Latest commit fec70799366ba15e6d6d2fabe098c7ec2b1a5a7a
Latest deploy log https://app.netlify.com/sites/kitbag-router/deploys/669d2393c2a5c70008df2769
Deploy Preview https://deploy-preview-227--kitbag-router.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.