Skip to content

Conversation

@liuxingbaoyu
Copy link
Member

@liuxingbaoyu liuxingbaoyu commented Feb 20, 2023

Q                       A
Fixed Issues? Fixes #15444
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

ref: #15022

@nicolo-ribaudo @JLHwung This seems to be a regression affecting quite a few people, let's release a patch, thanks!

@liuxingbaoyu liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: generator area: sourcemaps i: regression labels Feb 20, 2023
@babel-bot
Copy link
Collaborator

babel-bot commented Feb 20, 2023

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53994/

map,
resolvedSources[i],
this._inputMap.sourcesContent[i],
this._inputMap.sourcesContent?.[i],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We can skip this full loop if there's no sourcesContent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect sources? At first I skipped the whole loop, but then I'm not sure if sources will be preserved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of eagerly adding all sources, it'll only adds source as they are marked. It's not important to keep a source that was input if that source is never seen in the map, but setting a sourcesContent forces it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: sourcemaps i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: generating source maps fails due to sourcesContent being undefined

4 participants