babel / babel-brunch

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

Update to @babel/preset-env #69

Open clarknelson opened 4 years ago

clarknelson commented 4 years ago

The recommended preset is read-only by babel. We should update the docs to reflect the new package.

existentialism commented 4 years ago

@clarknelson agree! care to send a PR?

clarknelson commented 4 years ago

I would but i'm not 100% sure my implementation is even working. Here is my config:

module.exports = {
  optimize: true,
  ...
  plugins: {
    babel: {
      presets: [
        ["@babel/preset-env", {
          targets: {
            browsers: ['last 2 versions']
          }
        }]
      ]
    }
  }
};

I noticed yesterday that one of my projects was not removing Symbol for IE11 projects, where i'm pretty sure this has worked with the same setup in the past. I came here to make sure my config was correct, but now i'm not sure what to do. I guess I will have to debug, and if I can get it working I will update the readme.

jngbng commented 3 years ago

@clarknelson Thanks. it works for me, too.