Is Babel supported?
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 :/
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
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?
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.