diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /babel.config.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'babel.config.js')
-rw-r--r-- | babel.config.js | 24 |
1 files changed, 18 insertions, 6 deletions
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) { |