Skip to content

Commit

Permalink
fix(nuxt): generate typed routes after pages are scanned (#26206)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 12, 2024
1 parent 5089016 commit a04b88b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/pages/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default defineNuxtModule({
}

// Regenerate types/typed-router.d.ts when adding or removing pages
nuxt.hook('builder:generateApp', async (options) => {
nuxt.hook('app:templatesGenerated', async (_app, _templates, options) => {
if (!options?.filter || options.filter({ filename: 'routes.mjs' } as any)) {
await context.scanPages()
}
Expand Down

0 comments on commit a04b88b

Please sign in to comment.