-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TextField] Module parse failed: Unexpected token #20812
Comments
@mhienle This is expected, our sources take advantage of the latest version of ECMAScript, by extension, it impacts the
They are both in stage 4. So they will be included in the next language specification (around June 2020?)
|
@oliviertassinari If this is expected, could you point me to a workaround? This currently prevents my team from upgrading to v4.9.12 |
@mhienle The answer is in https://material-ui.com/guides/minimizing-bundle-size/#ecmascript, this is meant for advanced cases. Your question makes me believe you are not on the targeted audience for using the /es distribution. |
The docs point to the latest spec. Stage 4 is not part of the spec (yet). The problem is that babel no longer offers the ability to transpile for a certain version of ES. I'd say we fix it here and rewrite the section in v5 to match how babel works. |
@oliviertassinari Thanks for your help. |
We don't discourage the usage of /es per say. It's meant for advanced use cases. |
@eps1lon should we reopen? |
@mhienle I just upgrade material-ui core to 4.9.5 and it working :) |
We were also able to update to 4.9.13 after no longer using the es-bundle of material. This increased our bundle size by approx. 1% which we considered to be fine. |
version 4.9.11 also without this error ) |
It works for me !!!
and comment inside the if statement. if (variant === 'outlined') {
} |
@Farbod29 Note that the |
After updating to v4.9.12, I get the following error:
Current Behavior 😯
The above error occurs when I start webpack-dev-server. It disappears when I locally change the line
to
in TextField.js.
Expected Behavior 🤔
The error should not occur.
Steps to Reproduce 🕹
Context 🔦
Your Environment 🌎
Related to #20715
The text was updated successfully, but these errors were encountered: