From d0d78b7c487f07c9dd814fbf6f70021031f671bf Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 19 May 2022 13:41:50 +0100 Subject: [PATCH] Merge pull request #8004 from overleaf/ae-babel-preset-order Fix the order of Babel presets GitOrigin-RevId: a4d94a2f1a567b9073bf945c90fc8bf01b2058ec --- services/web/babel.config.json | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/services/web/babel.config.json b/services/web/babel.config.json index abd5c2d0d0..dd1f1663b6 100644 --- a/services/web/babel.config.json +++ b/services/web/babel.config.json @@ -1,12 +1,5 @@ { "presets": [ - "@babel/typescript", - [ - "@babel/react", - { - "runtime": "automatic" - } - ], [ "@babel/env", { @@ -14,7 +7,9 @@ // This version must be aligned with the `core-js` version in `package.json` "corejs": { "version": 3.6 } } - ] + ], + ["@babel/react", { "runtime": "automatic" }], + "@babel/typescript" ], "plugins": ["angularjs-annotate", "macros"], // Target our current Node version in test environment, to transform and @@ -22,22 +17,17 @@ "env": { "test": { "presets": [ - "@babel/typescript", - [ - "@babel/react", - { - "runtime": "automatic" - } - ], [ "@babel/env", { - "targets": { "node": "14.18" }, + "targets": { "node": "current" }, "useBuiltIns": "usage", // This version must be aligned with the `core-js` version in `package.json` "corejs": { "version": 3.6 } } - ] + ], + ["@babel/react", { "runtime": "automatic" }], + "@babel/typescript" ] } }