-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore(babel): added babel to support es6 #10517
Conversation
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.
ES2015 🎉
What about babel-preset-env? It seems like that is the recommendation now. |
@Frank3K I certainly thought of it but i realized it shouldn't be env based..
|
I think you should use the list that is used by autoprefixer (in scripts/gulp-utils.js). Please note that there are issues with the current version of UglifyJS, as is documented on babel-preset-env. |
@devversion what do you think? |
@EladBezalel I think that the |
Note that you can add the browserlist to package.json, or set it in a separate config file as described here. Autoprefixer and babel-env-preset will automatically pick it up. |
@Frank3K @devversion please review |
@@ -48,6 +49,9 @@ function buildJs () { | |||
|
|||
var jsBuildStream = gulp.src( jsFiles ) | |||
.pipe(filterNonCodeFiles()) | |||
.pipe(babel({ | |||
presets: [["env", {targets: {browsers: config.browsers}}]] |
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.
sounds like useBuiltIns
would work better
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.
If I understand it correctly useBuiltIns
alone won't solve the minification issues. I'm not sure what uglify + useBuiltIns
does.
The option useBuiltIns
seems to require a module loader (see explanation).
This is look good. Let's finish with final changes and one last review. |
Closing as not valid for stabilization. |
No description provided.