Comments (3)
Hey @karyon! 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.
from website.
I agree that it could be confusing to users. Here I provide some context:
The current REPL was designed when stage-x presets were still a thing. Later we deprecated the preset in favor of preset-env but we didn't figure out a way to demonstrate Babel's ability to transform many ES proposals on REPL: So the stage-2 preset, as well as other stage presets become convenient toggles on REPL: They let you see how Babel transforms ES proposals like decorators, pipeline operators, records and tuples and so on, since they will not be covered by preset-env
until they are advanced to stage 4.
from website.
I see. So first I thought that class fields were transpiled because the stage-x presets wasn't updated in five years, as the npm package turned up by the google search suggested. Your comment sounds like they are actually still updated with new proposals. Which made me wonder again, why are class fields transpiled even though they are in stage 4 by now? Looking at the code, it seems like proposals cannot be removed from the stage-x presets because that would be a breaking change, which is understandable but does not make sense in the context of the REPL and adds to the confusion there.
So I see multiple ways to fix my source of confusion:
- Replace the stage-x presets in the REPL by something that's closer to the recommended way to use such proposal plugins
- Remove stage-4 proposals from the stage-x presets in the REPL
- Remove the stage-2 preset from the default presets (preferably together with the fix above)
If the stage-x presets are kept, what would also help:
- Provide some clarity, like putting them in a "experimental syntax presets" section, and explaining that these presets are just a showcase and not meant to be actually used.
- Document which plugins are contained. I couldn't find that information apart from searching in babel's code.
from website.
Related Issues (20)
- Consider replacing the word „blacklisting” HOT 3
- Dead anchor link at https://babeljs.io/docs/en/options#ineffective-browserslist-queries HOT 2
- Wrong file mention HOT 1
- Unable to use decorators in repl HOT 2
- "Built-ins" throws on REPL HOT 5
- [Bug]: Documentation for Rails is for Rails 6, but Rails is on Rails 7 HOT 7
- doc index page, jsx example has syntax error HOT 2
- https://babeljs.io/versions is out of date HOT 1
- The repl ("Try it out") feature on the website could really use a reset button HOT 1
- Configure redirects from `/en/` to `/` HOT 2
- Broken links HOT 7
- Website HOT 1
- [Bug]: Need to improve documentation for babel-plugin-proposal-decorators HOT 2
- How to get in touch regarding a security concern HOT 3
- REPL: cannot specify rhino as a target HOT 1
- JSX DEV transform is undocumented HOT 2
- [Bug]: "Get browser-compatible JavaScript out" Scrollbar Not working HOT 4
- The section in the docs on Polyfills is unclear HOT 1
- The content of the plugin development document should be merged into the current repository HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.