diff --git a/experimental/babel-preset-env/scripts/build-data.js b/experimental/babel-preset-env/scripts/build-data.js index 9d20ec766b..1c70a4884f 100644 --- a/experimental/babel-preset-env/scripts/build-data.js +++ b/experimental/babel-preset-env/scripts/build-data.js @@ -85,11 +85,6 @@ const getLowestImplementedVersion = ({ features }, env) => { // `equals` in compat-table Object.keys(test).forEach((t) => { test[invertedEqualsEnv[t]] = test[t]; - // add opera - if (t.startsWith("chrome")) { - let opera = parseInt(t.replace("chrome", "")) - 13; - test[`opera${opera}`] = test[t]; - } }); return Object.keys(test) @@ -131,6 +126,11 @@ for (const pluginName in pluginFeatures) { plugin[env] = version; } } + + // add opera + if (plugin.chrome) { + plugin.opera = plugin.chrome - 13; + } }); data[pluginName] = plugin; }