Skip to content
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

Is Babel supported? #23

Open
ryuuji3 opened this issue Oct 21, 2020 · 3 comments
Open

Is Babel supported? #23

ryuuji3 opened this issue Oct 21, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ryuuji3
Copy link

ryuuji3 commented Oct 21, 2020

Hi,

I have some files that use experimental syntax- eg. nullishCoalescingOperator.
For some reason even with babel, the REPL shows SyntaxError on the lines that use experimental syntax :/

@axilleasiv
Copy link
Owner

axilleasiv commented Oct 21, 2020

Hey @ryuuji3, the repl under the hood is using Babel through a modified version of parcel-bundler(v1).

I have tested this and it seems to work fine by using in my test code a .babelrc file like the following:

{
  "plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"]
}

or by using a .babelrc.js file like the following:

module.exports = {
  plugins: ['@babel/plugin-proposal-nullish-coalescing-operator'],
};

So I am thinking that maybe you have an issue like this by using a babel.config.js file or something similar that is not supported by parcel v1. The version that I am using is looking for a babel configuration in a .babelrc or .babelrc.js

@ryuuji3
Copy link
Author

ryuuji3 commented Oct 22, 2020

Hi thanks for getting back to me!
That is the case. Not knowing too much about parcel, is it possible to support babel.config.js?

@axilleasiv
Copy link
Owner

I think that is possible to support the babel configuration through the babel.config.js file. So I am adding this as a feature and depending on the effort of implementation, it will be added in one of the next releases.

Thank you so much for your feedback and If you have any other issue or you think that any feature is missing, feel free to post about it.

@axilleasiv axilleasiv added the enhancement New feature or request label Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants