How to list applied transformed for a specified set of targets for babel-preset-env?

162 Views Asked by At

We're using babel-preset-env and a specified set of browser versions as targets so that only the needed transforms are applied. We would like to keep this set of versions inline with the versions that are supported by the vendors while staying as permissive as possible in that support. So is there a way to list the transforms that are applied for a set of targets. For example, if you did the following (like the example):

const presets = [
  [
    "@babel/env",
    {
      targets: {
        edge: "17",
        firefox: "60",
        chrome: "67",
        safari: "11.1",
      },
      useBuiltIns: "usage",
    },
  ],
];

Then how can we tell the set of transforms that will be applied with that setup? We want to know this because Firefox ESR was recently updated to 68 and it would be nice to check if updating that would change anything about the transforms that are applied. Also, would updating the Safari version to 12 change anything? Because if not, then it may be worth just sticking with the older version number to support more users since it won't really change anything in our build output.

So is there a way to get the list of transformations for a specific set of targets to understand how it will impact our build output?

0

There are 0 best solutions below