Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Invalid sources in WebPack-generated map file #14277

Closed
1 task
fpascutti opened this issue Feb 16, 2022 · 5 comments 路 Fixed by #14282
Closed
1 task

[Bug]: Invalid sources in WebPack-generated map file #14277

fpascutti opened this issue Feb 16, 2022 · 5 comments 路 Fixed by #14282
Labels
area: sourcemaps i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@fpascutti
Copy link

馃捇

  • Would you like to work on a fix?

How are you using Babel?

babel-loader (webpack)

Input code

Small project where issue can be reproduced can be found here:
https://github.com/fpascutti/babel-7.17.3-sourcemaps-issue

Configuration file name

No response

Configuration

No response

Current and expected behavior

With @babel/core >= 7.17.3, the source map file generated by Webpack contains Javascript code instead of the expected Typescript code.
Using @babel/core 7.17.2, the source map file generated by Webpack properly contains the original Typescript code.

Environment

System:
OS: Windows 10 10.0.19042
Binaries:
Node: 16.13.1 - C:\nodejs\node.EXE
npm: 8.1.2 - C:\nodejs\npm.CMD
npmPackages:
@babel/core: ^7.17.3 => 7.17.4
@babel/preset-env: ^7.16.11 => 7.16.11
babel-loader: ^8.2.3 => 8.2.3
webpack: ^5.69.0 => 5.69.0

Possible solution

Workaround is to force @babel/core to version 7.17.2.

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @fpascutti! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@nicolo-ribaudo
Copy link
Member

cc @jridgewell

@alan-agius4
Copy link

In the Angular CLI we are also experiencing a similar issue. It seems that it only effects non posix OS.

@jridgewell
Copy link
Member

Hi all, I believe I have a fix in #14282, but I don't have a Windows machine to fully test it. Can any of you apply the patch and see if it fixes the merging?

@jridgewell
Copy link
Member

Scratch that, I was able to verify the fix using GH Actions. Thanks so much for the reproduction @fpascutti!

@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 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants