Repository navigation
fix: preserve false tsconfig option - #1065
Conversation
β Deploy Preview for tsdown-main ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tsdown
create-tsdown
@tsdown/css
@tsdown/exe
tsdown-migrate
commit: |
There was a problem hiding this comment.
π‘ Changes recommended
A small regression test should be added to assert that tsconfig: false is actually forwarded into Rolldown input options to prevent this bug from recurring.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes propagation of the tsconfig option into Rolldown input options so that an explicit false value is preserved (rather than being coerced to undefined), aligning the build behavior with the documented option semantics.
Changes:
- Replace
tsconfig || undefinedwithtsconfig ?? undefinedwhen building Rolldown input options. - Ensure
tsconfig: falsecan be forwarded to Rolldown to disable automatic tsconfig resolution.
File summaries
| File | Description |
|---|---|
| src/features/rolldown.ts | Preserves explicit false for the tsconfig option when creating Rolldown input options. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
π‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AI usage
AI usage
Description
Preserve the
falsevalue of thetsconfigoption when passing it to Rolldown.tsconfigaccepts bothfalseand a string path. The current implementation uses the||operator:When
tsconfigis explicitly set tofalse, it is converted toundefined. This prevents Rolldown from receivingtsconfig: falseand causes it to fall back to automatic tsconfig resolution.This PR changes the fallback to nullish coalescing:
This preserves both supported values while still handling
undefinedcorrectly.The issue was reproduced in a NuxtHub project using
tsconfig: false.Linked Issues
N/A
Additional context
The bug was reproduced with a NuxtHub project and the fix was validated by running the project successfully with
tsconfig: false.A minimal reproduction is available here:
https://github.com/Masutayunikon/Fankarr-Bridge