Nuxt.js: Move from babel-preset-es2015 to babel-preset-env

Created on 17 Oct 2017  Â·  7Comments  Â·  Source: nuxt/nuxt.js

Now when installing packages there is warning:

[1/4] Resolving packages...
warning nuxt > [email protected]: �  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
[2/4] Fetching packages...

Maybe switch from preset-es* to env?

This feature request is available on Nuxt.js community (#c1684)
available soon enhancement

Most helpful comment

It's implemented in the next release, coming soon.

All 7 comments

It's implemented in the next release, coming soon.

Is there any way we can force this switch now? I'm using Objection.js and I'm having an issue I don't think I can go around with if I don't use the following config:

"presets": [ ["env", { "targets": { "node": "current" } }], "stage-1" ],

How can I do so?

@Atinux , will it be possible to change the babel-preset-env options via nuxt.config.js?
Now I have different options for client/server(targets: ie:9/node:true) and can't configure their correct, because don't have context

Are you setting build.babel.presets key?

@Atinux , yes. How I can specify targets in this preset? This property different for client and server, but bundles for their build with the single command - 'nuxt build'. I don't now how dynamically change this property during assembly

I can specify different environments in .babelrc. But there is no possibility specify process.env.BABEL_ENV dynamically

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazycrazy picture lazycrazy  Â·  3Comments

maicong picture maicong  Â·  3Comments

msudgh picture msudgh  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

shyamchandranmec picture shyamchandranmec  Â·  3Comments