Add numeric separator to shippedProposals in preset-env
See original GitHub issueFeature Request
<div align="center">Numeric Separator is Stage 3 and shipped in Chrome 75/Firefox 70/Safari 13!

</div>
This means that it should be enabled via shippedProposals: true
options in @babel/preset-env
🎉
It should be done similarly to this commit: https://github.com/babel/babel/pull/8438/commits/28bbd9fb0e010e077bf1e4c3ec4fa25098ea9430
- Add it to
packages/babel-preset-env/src/available-plugins.js
- Add the
compat-table
mapping topackages/babel-preset-env/data/plugin-features.js
(you can find the correct feature name at https://kangax.github.io/compat-table/esnext/) - Add it to
packages/babel-preset-env/data/shipped-proposals.js
- Run
cd packages/preset-env
andyarn build-data
to update the data about the supported browser versions - Add it to
@babel/preset-env-standalone
(packages/babel-preset-env-standalone/src/available-plugins.js
) - Update the test as needed (you don’t need to write new tests)
- PR! 🎉
If it is the first time that you contribute to Babel, follow these steps: (you need to have make
and yarn
available on your machine)
- Write a comment there to let other possible contributors know that you are working on this bug.
- Fork the repo
- Run
git clone https://github.com/<YOUR_USERNAME>/babel.git && cd babel
- Run
yarn && make bootstrap
- Wait ⏳
- Run
make watch
(ormake build
whenever you change a file) - Add a test if needed (only
input.js
;output.js
will be automatically generated) - Update the code!
yarn jest babel-preset-env
to run the tests- Since you don’t need to write new tests, you can run
OVERWRITE=true yarn jest babel-preset-env
and they will be automatically updated.
- Since you don’t need to write new tests, you can run
- If it is working, run
make test
to run all the tests - Run
git push
and open a PR!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
babel/plugin-proposal-numeric-separator
NOTE**: This plugin is included in `@babel/preset-env`, ... Binary, Hex and Octal number representations to their pre-ES2015 numeric literal form, add the ...
Read more >@babel/plugin-proposal-numeric-separator - Package Manager
Fast, reliable, and secure dependency management.
Read more >@babel/helper-builder-react-jsx-experimental: Versions | Openbase
babel-preset-env. #10862 Add js extension to preset-env generated polyfill imports (@JLHwung) ... #10971 Add numeric separator to shippedProposals (@Wetinee).
Read more >babel-preset-latest-node v5.5.1 - npm.io
@babel/preset-env, especially targets.node ... shippedProposals - Enable features in stages but already available in recent ... numeric-separator, no, no ...
Read more >Could not find plugin "proposal-numeric-separator"
The following steps work: Add the following line to package.json : "resolutions": { "@babel/preset-env": "7.5.5" },.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d like to try this out, with such detailed instructions above. 😉
@Wetinee has talked to me offline a bit. She’s working on it after the holiday seasons.