-
Notifications
You must be signed in to change notification settings - Fork 263
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
Transpile ES6 code through Babel in Webpack 4 #2155
Conversation
@@ -25,7 +25,8 @@ | |||
"Ruben Moya <[email protected]>", | |||
"Jesus Arroyo Torrens <[email protected]>", | |||
"Iago Lastra <[email protected]>", | |||
"Elena Torró <[email protected]>" | |||
"Elena Torró <[email protected]>", | |||
"Jesús Botella <[email protected]>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ssshh...nobody's gonna notice 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕵️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! What's going on here? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but what happened 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. On to acceptance.
We should check that building the public one works fine. Also comparing bundle sizes might be interesting in this case, regarding ES6 & so on
"babel-preset-es2015": "~6.24.1", | ||
"babelify": "~7.3.0", | ||
"babelify": "^7.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I think I did a bundle size comparison and there wasn't a big difference in terms of size :( What can be interesting is to reduce the final bundle, because it is now ~300kb minified. |
That's fine, we're adding support for ES6 so I was worried we might have some extra boilerplate. 300kb is huge though 🤔 |
Yes, I passed the Webpack Bundle Analyzer, and it was mostly jQuery, Backbone, and Underscore. |
This PR enables us to write ES6 code in Carto.js, by later transpiling it when making the production bundle.
And I did the update to Webpack 4 as well because I saw it easy 🤷♂️
This PR has to be merged in conjunction with CartoDB/cartodb#14117