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

presets overwrite doesn't work as expected inside babelrc env options #7150

Closed
hualu00 opened this Issue Jan 4, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@hualu00

hualu00 commented Jan 4, 2018

I'm trying to overwrite the presets es2015 in build env, so that we could support es2015 modules. Bellowing is some basic babelrc config

{
  "presets": [
    "es2015",
    "react",
    "stage-0"
  ],
 "env": {
    "build": {
      "presets": [
        [ "es2015", { "modules": false } ],
        "react",
        "stage-0"
      ] 
    }
  }
}

However the modules are still transfered to commonjs modules.
PS: I've changed the BABEL_ENV to 'build' and babel version is 6.X

Am I doing something wrong?

@babel-bot

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Jan 4, 2018

Collaborator

Hey @hualu00! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

Collaborator

babel-bot commented Jan 4, 2018

Hey @hualu00! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@hualu00 hualu00 changed the title from presets doesn't work as expected inside babelrc env options to presets overwrite doesn't work as expected inside babelrc env options Jan 5, 2018

@loganfsmyth

This comment has been minimized.

Show comment
Hide comment
@loganfsmyth

loganfsmyth Aug 12, 2018

Member

Unfortunately this is expected behavior. In Babel 6, presets and plugins are purely additive and do not override eachother.

Member

loganfsmyth commented Aug 12, 2018

Unfortunately this is expected behavior. In Babel 6, presets and plugins are purely additive and do not override eachother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment