babel / babel-brunch

Brunch plugin for Babel
ISC License
69 stars 38 forks source link

Env default #49

Closed yavorsky closed 7 years ago

yavorsky commented 7 years ago

This PR includes 2. from https://github.com/babel/babel-brunch/pull/48 Also, it removes 'es2015' and 'es2016' presets from defaults in favor of babel-preset-env. This solution wouldn't break anything for people who are using no configs and allow them to prevent writing all presets in presets array and just add env option to pick only plugins they needed. Without any specified target it works exactly like babel-preset-latest.

Possible config:

plugins: {
  babel: {
    env: {
      targets: {
        safari 7, 
        browsers: '>2%'
      },
      useBuiltIns: true
    }
  }
}