-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] Upgrade Babel 6 to Babel 7 #10964
Conversation
646aefc
to
d52d3d3
Compare
a8ed928
to
dbfbfe6
Compare
59c3b8f
to
9748f65
Compare
57ebdf6
to
588464d
Compare
903b0fe
to
78641e1
Compare
The performance metrics I have to compare Babel 7 vs 6 cc @loganfsmyth Execution time 👍 :I have no clue what the incertainty is, so it might not be siginiticant: -test_build: 02:39
+test_build 02:25
-test_browser 01:47
+test_browser 01:37
-test_unit 02:46
+test_unit 02:46 Generated code size output 👎 :{
"name": "The initial cost people pay for using one component",
"webpack": true,
"path": "packages/material-ui/build/Paper/index.js",
- "limit": "25.4 KB"
+ "limit": "26.0 KB"
},
{
"name": "The size of all the modules of material-ui.",
"webpack": true,
"path": "packages/material-ui/build/index.js",
- "limit": "101.4 KB"
+ "limit": "102.3 KB"
},
{ |
@oliviertassinari just curious, which bundles do you measure? I decided to look inside the development UMD bundle and noticed lots of |
@NMinhNguyen Interesting. I can see that too. To investigate :) |
@NMinhNguyen You were right, the umd/dev bundle was missing the execution of the
I don't use a bundle. I use an entry point: |
Here is another idea... stop using babel and switch to the typescript compiler? |
@lookfirst 1. We don't use TypeScript. 2. Babel is working on adding TypeScript support to it. |
@oliviertassinari You don't have to write typescript (language) to use the typescript (compiler). I'd be curious if it produces smaller code. |
@oliviertassinari As an experiment, I've been trying to compile using tsc and have made good progress, but I'm finding a bunch of issues, for example: ...
|
Following vercel/next.js#4050, it's still early, but let's see what's missing to complete the upgrade.
Blockers
[7.0.0-beta.41] Cannot read property 'slice' of undefined babel/babel#7572Babel 7 support kentcdodds/babel-plugin-preval#52:Following the stack trace, the error is coming from:
https://github.com/mui-org/material-ui/blob/1b90855ab0553b5cdb4c5bb9c1a66d8cb5cd48c6/docs/src/modules/components/withRoot.js#L7
A weird non transpilated file issue.