We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://stackblitz.com/edit/nuxt-starter-fx1aez
The structure of pages folder:
pages
Nuxt can generate the correct RouteNamedMap in .nuxt/types/typed-router.d.ts:
RouteNamedMap
.nuxt/types/typed-router.d.ts
declare module 'vue-router/auto/routes' { export interface RouteNamedMap { 'nested': RouteRecordInfo<'nested', '/nested', Record<never, never>, Record<never, never>>, 'nested-a': RouteRecordInfo<'nested-a', '/nested/a', Record<never, never>, Record<never, never>>, 'nested-b': RouteRecordInfo<'nested-b', '/nested/b', Record<never, never>, Record<never, never>>, } }
But if I add routeRules: { '/nested': { redirect: '/nested/a' } }, in nuxt.config.ts, nested-a and nested-b disappear from the autogenerated types:
routeRules: { '/nested': { redirect: '/nested/a' } },
nuxt.config.ts
nested-a
nested-b
declare module 'vue-router/auto/routes' { export interface RouteNamedMap { '/nested': RouteRecordInfo<'/nested', '/nested', Record<never, never>, Record<never, never>>, } }
This bug does not exist before. Maybe introduced by the new global routeRules.
routeRules
No response
The text was updated successfully, but these errors were encountered:
Start a new pull request in StackBlitz Codeflow.
Sorry, something went wrong.
danielroe
Successfully merging a pull request may close this issue.
Environment
Reproduction
https://stackblitz.com/edit/nuxt-starter-fx1aez
Describe the bug
The structure of
pages
folder:Nuxt can generate the correct
RouteNamedMap
in.nuxt/types/typed-router.d.ts
:But if I add
routeRules: { '/nested': { redirect: '/nested/a' } },
innuxt.config.ts
,nested-a
andnested-b
disappear from the autogenerated types:Additional context
This bug does not exist before. Maybe introduced by the new global
routeRules
.Logs
No response
The text was updated successfully, but these errors were encountered: