diff --git a/packages/nuxi/src/utils/prepare.ts b/packages/nuxi/src/utils/prepare.ts index 93a542838f..b7a9f52889 100644 --- a/packages/nuxi/src/utils/prepare.ts +++ b/packages/nuxi/src/utils/prepare.ts @@ -28,7 +28,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.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : [] + ...nuxt.options.typescript.includeWorkspace && nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : [] ] }) diff --git a/packages/schema/src/config/typescript.ts b/packages/schema/src/config/typescript.ts index 7b3c7d185e..4d0e002146 100644 --- a/packages/schema/src/config/typescript.ts +++ b/packages/schema/src/config/typescript.ts @@ -15,6 +15,11 @@ export default defineUntypedSchema({ */ strict: false, + /** + * Include parent workspace in the Nuxt project. Mostly useful for themes and module authors. + */ + includeWorkspace: false, + /** * Enable build-time type checking. *