-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Optional chaining breaks build when targeting modern browsers #2908
Comments
@yangshun I added MLH tag, it's probably just adding the 2 plugins in the webpack config. |
probably need to wait as there are pending changes to babel config here: https://github.com/facebook/docusaurus/pull/2903/files |
This may be fixed upstream: webpack/webpack#10227 (comment). Edit: Doh, looks like webpack 4 is still referencing acorn 6: https://github.com/webpack/webpack/blob/dfd20210c9441c309859d29d3b256474ae5101e5/package.json#L12. |
fixed by #2951 |
🐛 Bug Report
Using the optional chaining operator causes the build to fail when targeting modern browsers through
browserslist
. See facebook/create-react-app#8526 for the same issue we ran into in CRA.Have you read the Contributing Guidelines on issues?
Yes.
To Reproduce
"browserslist": ["last 1 chrome version"]
in package.json of generated project (may need to deletenode_modules/.cache
if it exists).mdx
documentstart
orbuild
script and observe error similar to following:Expected behavior
Build succeeds.
Actual Behavior
Your Environment
The text was updated successfully, but these errors were encountered: