From 21d6dcef5dab6ca803c0ed73b1339c0abf430e2e Mon Sep 17 00:00:00 2001 From: Ryan Clements Date: Sat, 3 Feb 2024 18:16:42 -0500 Subject: [PATCH] =?UTF-8?q?fix(nuxt):=20generate=20typed=20route=20declara?= =?UTF-8?q?tions=C2=A0when=20building=20(#25593)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/nuxt/src/pages/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index 9e610a14eb..bd6ae3b69d 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -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({