question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs: babel-present-env and stage-x proposals

See original GitHub issue

Feature Request

Is your feature request related to a problem? Reading https://babeljs.io/docs/en/babel-preset-env it says:

We leverage these data sources to maintain mappings of which version of our supported target environments gained support > of a JavaScript syntax or browser feature, as well as a mapping of those syntaxes and features to Babel transform plugins and > core-js polyfills.

It is important to note that @babel/preset-env does not support stage-x plugins.

The note about stage-x plugins makes it sound like no plugins of e.g. stage 3 would exist in present-env. Yet looking at the linked docs at https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json shows proposal-class-properties which is only in stage 3, see https://github.com/tc39/proposal-class-fields, is a supported stage 3 plugin.

Describe the solution you’d like The docs should be updated to not make a note about “does not support stage-x plugins” to say “not all”. Or something else. In addition, stage 4 are supported, but yet they fall under stage-x, so saying “not stage-x” seems overall to be incorrect.

In addition https://babeljs.io/docs/en/babel-plugin-proposal-class-properties does not mention it is in @babel/preset-env but many others do just that, like https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread (at the top of the docs).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thernstigcommented, Apr 12, 2021

I did find shippedProposals when reading further at https://babeljs.io/docs/en/babel-preset-env#shippedproposals

So that comment about “does not support stage-x plugins” is not entirely true then.

0reactions
hzoocommented, Apr 12, 2021

Yeah looks like I missed one or two, sorry for the confusion!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-scripts: Versions - Openbase
0.1 is a maintenance release that adjusts some ESLint rules for TypeScript along with other minor bug fixes and documentation updates. Breaking Change....
Read more >
谈谈常用Babel配置与babel-preset-env - 掘金
preset、stage-x都是plugin的范畴,只不过所覆盖的范围不同。 ... transform-decorators disabled pending proposal update (can use the legacy ...
Read more >
babel6和babel7中关于polyfill和preset-env和babel-plugin ...
babel7进行了较大的改动,废弃了 stage-x 的preset,还增加了命名空间区分官方 ... 可以直接导入提案 import "core-js/proposals/string-replace-all" ...
Read more >
“dockerfile arg example” Code Answer's
Try importing the library that defines 'docs', correcting the name to the name of an existing getter, or defining a getter or field...
Read more >
Attribute application@ appcomponentfactory value ... - Weebly
Business Profile PPT Free Download Butterms Docs Buttercup Button On ... Programming Languages for the Gumm community staged which means that kids como ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found