mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +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 mkdir(dirname(dtsFile), { recursive: true })
|
||||||
await context.scanPages(false)
|
await context.scanPages(false)
|
||||||
|
|
||||||
if (nuxt.options._prepare) {
|
if (nuxt.options._prepare || !nuxt.options.dev) {
|
||||||
// TODO: could we generate this from context instead?
|
// TODO: could we generate this from context instead?
|
||||||
const dts = await readFile(dtsFile, 'utf-8')
|
const dts = await readFile(dtsFile, 'utf-8')
|
||||||
addTemplate({
|
addTemplate({
|
||||||
|
Loading…
Reference in New Issue
Block a user