diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 1f24e30..b44d108 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,3 +1,9 @@ +4.0.1 +===== + +* Moved `@babel/preset-env` to the correct place in the config. + + 4.0.0 ===== diff --git a/index.js b/index.js index 8da7f44..e20bd0c 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,15 @@ const browserslistConfigs = require("@becklyn/browserslist-config/envs"); function buildConfig (browserslistConfig) { return { + presets: [ + // default env + ["@babel/preset-env", { + spec: false, + useBuiltIns: "entry", + corejs: 3, + targets: browserslistConfig, + }], + ], plugins: [ // ------------------------------------------------------------------------------------------ // Stage 3 proposals @@ -16,14 +25,6 @@ function buildConfig (browserslistConfig) // set with loose: true, as the compilation is pretty big // https://babeljs.io/docs/plugins/transform-class-properties/ ["@babel/plugin-proposal-class-properties", {loose: true}], - - // default env - ["@babel/preset-env", { - spec: false, - useBuiltIns: "entry", - corejs: 3, - targets: browserslistConfig, - }], ], }; }