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
Module parse failed on optional chaining #871
Comments
ok understand it is a problem of acorn version |
This is an upstream webpack issue: webpack/webpack#11186 It is fixed in Webpack 5 however it can not backport to webpack 4 since Acorn 7 introduces new AST for |
For those who also don't find here the solution - here is good explanation of what is going on |
Optional Chaining doesn't working in current webpack version. The Issue Reference : babel/babel-loader#871
For those who are using webpack < 5 and nothing is working then try this it worked for me |
BEFORE YOU SUBMIT please read the following:
Delete what isn't applicable below
I'm submitting a bug report
Webpack Version:
4.44.2
Babel Core Version:
7.11.6
Babel Loader Version:
8.1.0
Please tell us about your environment:
OSX 10.15
Current behavior:
I just try to remove the @babel/plugin-proposal-optional-chaining plugin from my configuration as it is natively supported (and managed through @babel/preset-env)
Compilation works correctly using pure babel
Compilation is failing with babel-loader
Expected/desired behavior:
As it works natively with browser, it must be supported as non transpiled.
Babel (through @babel/preset-env) and browerslist do their job.
But babel-loader here is blocking
The text was updated successfully, but these errors were encountered: