Skip to content

Should we leave the module transform enabled by default for env and es2015 in 7.x? #7517

@loganfsmyth

Description

@loganfsmyth

@TheLarkInn asked, and it seems like a discussion worth having.

Leaving it off by default would lead to people being more likely to get errors in things like Node by default, but it would potentially make the workflow easier for people using Webpack, since it's usually easier to add additional plugins than it is to remove them, since opting out first is more verbose, so people could do

{
  presets: ['@babel/env'],
  env: {
    test: {
      plugins: ['@babel/transform-modules-commonjs'],
    }
  }
}

which is a lot nicer than

{
  presets: [['@babel/env', { modules: false }]],
  env: {
    test: {
      plugins: ['@babel/transform-modules-commonjs'],
    }
  }
}

or even

{
  presets: [['@babel/env', { modules: false }]],
  env: {
    test: {
      presets: ['@babel/env'],
    }
  }
}

at least in my view?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulesi: discussionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions