babel-brunch icon indicating copy to clipboard operation
babel-brunch copied to clipboard

Update to @babel/preset-env

Open clarknelson opened this issue 5 years ago • 3 comments

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

clarknelson avatar Nov 11 '19 18:11 clarknelson

@clarknelson agree! care to send a PR?

existentialism avatar Nov 12 '19 17:11 existentialism

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.

clarknelson avatar Nov 12 '19 19:11 clarknelson

@clarknelson Thanks. it works for me, too.

jngbng avatar Jan 20 '21 01:01 jngbng