mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): generate typed route declarations when building (#25593)
This commit is contained in:
parent
876d910c3f
commit
21d6dcef5d
@ -182,7 +182,7 @@ export default defineNuxtModule({
|
||||
await mkdir(dirname(dtsFile), { recursive: true })
|
||||
await context.scanPages(false)
|
||||
|
||||
if (nuxt.options._prepare) {
|
||||
if (nuxt.options._prepare || !nuxt.options.dev) {
|
||||
// TODO: could we generate this from context instead?
|
||||
const dts = await readFile(dtsFile, 'utf-8')
|
||||
addTemplate({
|
||||
|
Loading…
Reference in New Issue
Block a user