Skip to content

Add babel-preset-latest support.#1027

Merged
timneutkens merged 4 commits intovercel:masterfrom
arunoda:add-babel-preset-2016
Feb 8, 2017
Merged

Add babel-preset-latest support.#1027
timneutkens merged 4 commits intovercel:masterfrom
arunoda:add-babel-preset-2016

Conversation

@arunoda
Copy link
Copy Markdown
Contributor

@arunoda arunoda commented Feb 7, 2017

Fixes #1026

This adds the support for Exponentiation operator (**)

This adds the support for Exponentiation operator (**)
@timneutkens
Copy link
Copy Markdown
Member

@arunoda I'm wondering why we wouldn't use latest (2015-16-17)

Copy link
Copy Markdown
Member

@timneutkens timneutkens left a 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)?

@arunoda
Copy link
Copy Markdown
Contributor Author

arunoda commented Feb 7, 2017

@timneutkens we don't need it to the server/webpack. It only transform import/export syntax only.

@thangngoc89
Copy link
Copy Markdown

What about using babel-preset-env and tell babel to transpile on code that are not supported by current node versison?

"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",
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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.

@nkzawa
Copy link
Copy Markdown
Contributor

nkzawa commented Feb 8, 2017

@thangngoc89 Our target environments is not only Node, but also browsers. So I think it wouldn't work :(

@thangngoc89
Copy link
Copy Markdown

@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

@arunoda
Copy link
Copy Markdown
Contributor Author

arunoda commented Feb 8, 2017

@thangngoc89 I tried. It works(with a latest node) and you need to provide non standard plugins manually we use.
We may need to support it some point, but we had to do some work for node. (SSR)
So, let's defer that.

@arunoda arunoda changed the title Add babel-preset-2016 support. Add babel-preset-latest support. Feb 8, 2017
Copy link
Copy Markdown
Member

@timneutkens timneutkens left a 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?

@arunoda
Copy link
Copy Markdown
Contributor Author

arunoda commented Feb 8, 2017

Nice. Take this in :)

@timneutkens timneutkens merged commit 55f4856 into vercel:master Feb 8, 2017
@nkzawa nkzawa mentioned this pull request Feb 8, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants