fix(@angular/build): resolve library bundle sourcemap sources relative to output directory - #34238
Open
alan-agius4 wants to merge 1 commit into
Open
alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the library builder pipeline to correctly resolve and relativize sourcemap paths for both ESM and DTS outputs. It introduces the outputPath parameter to executeMultiBundle and utilizes sourcemapPathTransform to transform source paths to relative POSIX paths. Additionally, the DTS bundler configuration is updated to use the 'oxc' generator, and corresponding tests are added to verify the correctness of the generated sourcemap paths. I have no feedback to provide.
alan-agius4
force-pushed
the
fix/library-sourcemap-sources
branch
from
October 1, 2026 15:26
b51de76 to
3fc6e40
Compare
alan-agius4
force-pushed
the
fix/library-sourcemap-sources
branch
from
October 1, 2026 15:30
3fc6e40 to
41217dd
Compare
…e to output directory Configure `cwd` and `sourcemapPathTransform` when generating FESM and declaration bundles in the library builder so that emitted sourcemap `sources` entries are computed relative to the actual output directory.
alan-agius4
force-pushed
the
fix/library-sourcemap-sources
branch
from
October 1, 2026 15:37
41217dd to
88eb30c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
In the
@angular/build:librarybuilder, Rolldown is invoked with a relativedir('fesm2022'or'types'), causing thesourcespaths in emitted.mjs.mapand.d.ts.mapfiles to be computed relative to<cwd>/fesm2022and<cwd>/typesrather than the actual output directory (<outputPath>/fesm2022and<outputPath>/types).What is the new behavior?
sourcemapPathTransformis configured to compute sourcemapsourcespaths relative to the actual output directory.Does this PR introduce a breaking change?