mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): generate typed routes after pages are scanned (#26206)
This commit is contained in:
parent
5089016695
commit
a04b88bfcd
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user