Skip to content

Conversation

@Smerly
Copy link

@Smerly Smerly commented Jan 30, 2026

Current Behavior

When using compiler: 'tsc' with TypeScript transformers (e.g. @nestjs/swagger/plugin) in a Nest app that imports from a shared library via path mappings, the build fails with TS6059 (file not under rootDir) and TS6307 (file not in project file list). The app’s tsconfig.app.json has narrow rootDir and include, so lib sources pulled in by the compiler are rejected.

Expected Behavior

The build succeeds. When compiler is tsc and transformers are present, a temporary tsconfig with relaxed rootDir and include is used for that webpack build so ts-loader and fork-ts-checker accept lib sources resolved via path mappings. The original tsconfig is unchanged for IDE and standalone tsc.

Related Issue(s)

Fixes #33337

…s from shared lib

When compiler is tsc and transformers are present, use a temp tsconfig with
relaxed rootDir and include so ts-loader and fork-ts-checker accept lib sources
resolved via path mappings.

Fixes nrwl#33337
@netlify
Copy link

netlify bot commented Jan 30, 2026

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit c83701a

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nx-dev Ready Ready Preview Jan 30, 2026 6:05am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: NestJS Swagger Plugin causes compilation errors in NX monorepo with shared libraries

1 participant