-
Notifications
You must be signed in to change notification settings - Fork 27.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
Add babel-preset-latest support. #1027
Conversation
This adds the support for Exponentiation operator (**)
@arunoda I'm wondering why we wouldn't use |
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.
Should it be added to server/webpack.js
too (babel transform)?
@timneutkens we don't need it to the server/webpack. It only transform import/export syntax only. |
What about using |
@@ -53,7 +53,7 @@ | |||
"babel-plugin-transform-es2015-modules-commonjs": "6.22.0", | |||
"babel-plugin-transform-object-rest-spread": "6.22.0", | |||
"babel-plugin-transform-runtime": "6.22.0", | |||
"babel-preset-es2015": "6.22.0", | |||
"babel-preset-latest": "6.22.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.
It looks we can remove transform-async-to-generator
which is included in this preset.
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.
Nice. It's comes with es2017
preset.
@thangngoc89 Our target environments is not only Node, but also browsers. So I think it wouldn't work :( |
@nkzawa you can config node and browser (based on caniuse database) separated but I didn't try it with next.js. If you have a chance, try babel-preset-env |
@thangngoc89 I tried. It works(with a latest node) and you need to provide non standard plugins manually we use. |
…ugin-latest It has es2017 preset and it comes with the above plugin.
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.
Nice 👍 @arunoda ready for merge?
Nice. Take this in :) |
Fixes #1026
This adds the support for Exponentiation operator (**)