fix(kit): apply nuxt types to .config/nuxt.config

resolves https://github.com/nuxt/nuxt/issues/25918
This commit is contained in:
Daniel Roe 2024-02-22 16:31:20 +00:00
parent aaad992433
commit 5440ececed
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -145,6 +145,7 @@ export async function writeTypes (nuxt: Nuxt) {
},
include: [
'./nuxt.d.ts',
join(relativeWithDot(nuxt.options.buildDir, nuxt.options.rootDir), '.config/nuxt.config.*'),
join(relativeWithDot(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'),
...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : [],
...nuxt.options._layers.map(layer => layer.config.srcDir ?? layer.cwd)