From 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 Aug 2020 18:42:06 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-3-stable-ee --- babel.config.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'babel.config.js') diff --git a/babel.config.js b/babel.config.js index 6d377305e46..64898bfdf50 100644 --- a/babel.config.js +++ b/babel.config.js @@ -9,8 +9,23 @@ let presets = [ useBuiltIns: 'usage', corejs: { version: 3, proposals: true }, modules: false, + /** + * This list of browsers is a conservative first definition, based on + * https://docs.gitlab.com/ee/install/requirements.html#supported-web-browsers + * with the following reasoning: + * + * - Edge: Pick the last two major version before the Chrome switch + * - Rest: We should support the latest ESR of Firefox: 68, because it used quite a lot. + * For the rest, pick browser versions that have a similar age to Firefox 68. + * + * See also this follow-up epic: + * https://gitlab.com/groups/gitlab-org/-/epics/3957 + */ targets: { - ie: '11', + chrome: '73', + edge: '17', + firefox: '68', + safari: '12', }, }, ], @@ -22,6 +37,8 @@ const plugins = [ '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-json-strings', '@babel/plugin-proposal-private-methods', + // See: https://gitlab.com/gitlab-org/gitlab/-/issues/229146 + '@babel/plugin-transform-arrow-functions', 'lodash', ]; @@ -35,11 +52,6 @@ if (BABEL_ENV === 'coverage') { ]); } -// add rewire support when running tests -if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') { - plugins.push('babel-plugin-rewire'); -} - // Jest is running in node environment, so we need additional plugins const isJest = Boolean(process.env.JEST_WORKER_ID); if (isJest) { -- cgit v1.2.3