From a9904a3ff79d162dc6842aaae888011449c5e8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ag=C3=A9nor=20Debriat?= Date: Mon, 3 Jul 2023 21:33:40 +0200 Subject: [PATCH] fix(nuxt): include external layers in `tsconfig.json` scope (#21917) --- packages/nuxi/src/utils/prepare.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nuxi/src/utils/prepare.ts b/packages/nuxi/src/utils/prepare.ts index 79aa930093..483c70908a 100644 --- a/packages/nuxi/src/utils/prepare.ts +++ b/packages/nuxi/src/utils/prepare.ts @@ -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: [