Open Omcsesz opened 1 year ago
Hey @Omcsesz! 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.
sourcemap
_this
does not exist in the sample and I cannot reproduce it.
sourcemap
_this
does not exist in the sample and I cannot reproduce it.
@liuxingbaoyu What is your output for npx babel script.js --out-file script-compiled.js --source-maps --presets=@babel/preset-env
?
What I checked was the test.zip
you uploaded.
Missed following up on the original VS Code issue. The .babelrc for me needs some tweaks for this to reproduce for me. Please npm i
in this zip, then npm run compile
to see the output (which is also included in the zip)
@connor4312 Thank you for your help!
💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Configuration file name
.babelrc
Configuration
Current and expected behavior
Current behavior: Babel does not rename
this
to_this
in the compiled file (see attachment). test.zip I compiled the js file with the following command:npx babel script.js --out-file script-compiled.js --source-maps --presets=@babel/preset-env
Environment
System: OS: Windows 10 10.0.19045 Binaries: Node: 18.12.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.3.0 - C:\Program Files\nodejs\npm.CMD
Possible solution
The proper thing to do would be for Babel to emit a sourcemap
names
alias to tell the debuggerthis
should be named_this
instead.Additional context
Hello, Team!
I'm opening this ticket, because in the repo of Visual Studio Code I was told this is the right place (see bug ticket https://github.com/microsoft/vscode/issues/171672). Can you please fix this?