New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable import.meta by default in @babel/parser #11364
Comments
Hey @JLHwung! 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." |
I would like to give it a try. |
Giving this a shot, wish me luck! |
@Wetinee mind if we give a first time contributor a shot? |
Sure! It's yours now! @kk-o |
@Wetinee thanks! 🙏 |
Also would like to give it a try |
* move files, remove hasPlugin() & expectPlugin()
* move files, remove hasPlugin() & expectPlugin()
mostly for record keeping; me vs javascript tooling round 5000 tried to drop the preprocessing in parcel-plugin-wasm.rs by going with --target web turns out that doesn't make any sense didn't realize this until _after_ writing it though; i've now seen way more parcel innards than i ever thought i'd need too (somehow the actual type of the generated field for assets is just not documented — reading the other assets to figure it out actually hurts more than it helps) ((also, parcel uses flow but not for these parts)) import.meta also made things pretty irritating (babel/babel#11364) went on an hour long detour through all the wasm-pack/wasm-bindgen options and how to best expose/use them through the plugin tried to use the bundler option (when not running on Node) also explodes in spectacular fashion; somehow parcel's wasm load just doesn't pass in imports I'm actually starting to think the find and replace scheme that's used right now is actually optimal.. So, really, it's parcel's fault. Webpack does the right thing here: parcel-bundler/parcel#647 I was going to say that this plugin (parcel-plugin-wasm-pack) manages to do better but really they do the exact same thing in a slightly less clumsy way: https://github.com/mysterycommand/parcel-plugin-wasm-pack/blob/f204a708d964127aaa1e5d278f41a44f5d76393b/src/WasmPackAsset.js#L174-L179 They do have tests though which is commendable
Feature Request
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: c3388ea
this.hasPlugin
andthis.expectPlugin
checks related toimportMeta
inpackages/babel-parser/src
importMeta
in@babel/parser
's testsexperimental
folder toes2020
If it is the first time that you contribute to Babel, follow these steps: (you need to have
make
andyarn
available on your machine)git clone https://github.com/<YOUR_USERNAME>/babel.git && cd babel
yarn && make bootstrap
make watch
(ormake build
whenever you change a file)input.js
;output.js
will be automatically generated)yarn jest babel-parser
to run the testsoutput.js
files and run the tests againOVERWRITE=true yarn jest babel-parser
and they will be automatically updated.yarn jest
to run all the testsgit push
and open a PR!The text was updated successfully, but these errors were encountered: