Skip to content

Allow TypeScript configs that set allowImportingTsExtensions - #1343

Open
Hashim1999164 wants to merge 1 commit into
vercel:mainfrom
Hashim1999164:fix-ts-allow-importing-extensions
Open

Allow TypeScript configs that set allowImportingTsExtensions#1343
Hashim1999164 wants to merge 1 commit into
vercel:mainfrom
Hashim1999164:fix-ts-allow-importing-extensions

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 28, 2026

Copy link
Copy Markdown

Fixes #1146

ncc already forces noEmit false so it can emit JavaScript. User tsconfig files that set allowImportingTsExtensions with noEmit true then fail with TS5096.

Keep emitting JavaScript, clear emitDeclarationOnly, and ignore TS5096 when the project enabled allowImportingTsExtensions so .ts import specifiers still typecheck.

ncc already forces noEmit false to emit JavaScript, which then fails with TS5096 when the project also enabled allowImportingTsExtensions. Ignore that config diagnostic and keep emitDeclarationOnly off so .ts import specifiers still typecheck.
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.

Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set.

1 participant