Skip to content

fix(bundling): disable swc input source map resolution#35010

Merged
FrozenPandaz merged 1 commit intomasterfrom
gh-32671
Mar 25, 2026
Merged

fix(bundling): disable swc input source map resolution#35010
FrozenPandaz merged 1 commit intomasterfrom
gh-32671

Conversation

@leosvelperez
Copy link
Copy Markdown
Member

Current Behavior

When using compiler: 'swc' with useLegacyTypescriptPlugin: false in rollup config, builds fail with errors like:

ERROR failed to read input source map: failed to find input source map file "index.js.map"

SWC defaults inputSourceMap to true, causing it to look for .js.map files for TypeScript source inputs that obviously don't have them.

Expected Behavior

Builds should succeed without source map resolution errors. Rollup handles source maps via its own output pipeline — the SWC transform step should not independently try to resolve input source maps.

Related Issue(s)

Fixes #32671

SWC defaults inputSourceMap to true, causing it to look for
.js.map files for TypeScript source inputs that don't have them.
Rollup handles source maps via its own pipeline.
@leosvelperez leosvelperez requested a review from a team as a code owner March 25, 2026 12:24
@leosvelperez leosvelperez requested a review from MaxKless March 25, 2026 12:24
@leosvelperez leosvelperez self-assigned this Mar 25, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 0dec3ef
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69c3d4129c42f30008c8fbbc
😎 Deploy Preview https://deploy-preview-35010--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 0dec3ef
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69c3d412500c680008d05faf
😎 Deploy Preview https://deploy-preview-35010--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Mar 25, 2026

View your CI Pipeline Execution ↗ for commit 0dec3ef

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 49m 19s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 9s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 8s View ↗
nx build workspace-plugin ✅ Succeeded 2m 6s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-25 13:21:55 UTC

@FrozenPandaz FrozenPandaz merged commit 55f8888 into master Mar 25, 2026
24 checks passed
@FrozenPandaz FrozenPandaz deleted the gh-32671 branch March 25, 2026 13:55
FrozenPandaz pushed a commit that referenced this pull request Mar 26, 2026
## Current Behavior

When using `compiler: 'swc'` with `useLegacyTypescriptPlugin: false` in
rollup config, builds fail with errors like:

```
ERROR failed to read input source map: failed to find input source map file "index.js.map"
```

SWC defaults `inputSourceMap` to `true`, causing it to look for
`.js.map` files for TypeScript source inputs that obviously don't have
them.

## Expected Behavior

Builds should succeed without source map resolution errors. Rollup
handles source maps via its own output pipeline — the SWC transform step
should not independently try to resolve input source maps.

## Related Issue(s)

Fixes #32671

(cherry picked from commit 55f8888)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERROR failed to read input source map: failed to find input source map file "index.js.map" when setting useLegacyTypescriptPlugin to false

2 participants