Enable import.meta by default in @babel/parser
See original GitHub issueFeature Request
<div align="center">import.meta
is Stage 4!
This means that it should be enabled by default in @babel/parser
🎉
It should be done similarly to this commit: https://github.com/babel/babel/commit/c3388ea42f3ec2d9614503fd0eff81b679ba12a7
- Remove all the
this.hasPlugin
andthis.expectPlugin
checks related toimportMeta
inpackages/babel-parser/src
- Remove all the usages of
importMeta
in@babel/parser
’s tests - Probably there is a test to ensure that the plugin is required; it can be removed.
- Move the tests from the
experimental
folder toes2020
- 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-parser
to run the tests- If some test outputs don’t match but the new results are correct, you can delete the bad
output.js
files and run the tests again - If you prefer, you can run
OVERWRITE=true yarn jest babel-parser
and they will be automatically updated.
- If some test outputs don’t match but the new results are correct, you can delete the bad
- If it is working, run
yarn jest
to run all the tests - Run
git push
and open a PR!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
babel/plugin-syntax-import-meta
NOTE**: This plugin is included in `@babel/preset-env`, in [ES2020](https://github.com/tc39/proposals/blob/master/finished-proposals.md)
Read more >How to use the @babel/plugin-syntax-import-meta.default ...
To help you get started, we've selected a few @babel/plugin-syntax-import-meta.default examples, based on popular ways it is used in public projects.
Read more >How to enable import assertions for Babel? - Stack Overflow
react-scripts doesn't load babel configuration by default. Install the following packages npm i -D customize-cra react-app-rewired.
Read more >babel-plugin-transform-import-meta | Yarn - Package Manager
babel -plugin-transform-import-meta. Transforms import.meta for nodejs environments. This plugin replaces any occurrence of import.meta.url .
Read more >babel-plugin-transform-import-meta - npm
Transforms import.meta for nodejs environments. Latest version: 2.2.0, last published: 6 months ago.
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
@Wetinee thanks! 🙏
Also would like to give it a try