fix(nuxt): include external layers in tsconfig.json scope (#21917)

This commit is contained in:
Agénor Debriat 2023-07-03 21:33:40 +02:00 committed by GitHub
parent ddb02f6486
commit a9904a3ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,7 @@ export const writeTypes = async (nuxt: Nuxt) => {
'./nuxt.d.ts',
join(relative(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'),
...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : [],
...nuxt.options._layers.filter(layer => !(layer.config.srcDir ?? layer.cwd).startsWith(nuxt.options.rootDir)).map(layer => join(relative(nuxt.options.buildDir, layer.config.srcDir ?? layer.cwd), '**/*')),
...nuxt.options.typescript.includeWorkspace && nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : []
],
exclude: [