diff options
Diffstat (limited to 'babel.config.js')
-rw-r--r-- | babel.config.js | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/babel.config.js b/babel.config.js index a545d8e6062..6838df3ad84 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,7 +1,5 @@ const coreJSVersion = require('./node_modules/core-js/package.json').version; -const BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV || null; - let presets = [ [ '@babel/preset-env', @@ -15,7 +13,6 @@ let presets = [ // include stage 3 proposals const plugins = [ - '@babel/plugin-syntax-import-meta', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-json-strings', '@babel/plugin-proposal-private-methods', @@ -28,26 +25,9 @@ const plugins = [ 'lodash', ]; -// add code coverage tooling if necessary -if (BABEL_ENV === 'coverage') { - plugins.push([ - 'babel-plugin-istanbul', - { - exclude: ['app/assets/javascripts/locale/**/app.js'], - }, - ]); -} - -// Jest is running in node environment, so we need additional plugins +// Jest is running in node environment const isJest = Boolean(process.env.JEST_WORKER_ID); if (isJest) { - plugins.push('@babel/plugin-transform-modules-commonjs'); - /* - without the following, babel-plugin-istanbul throws an error: - https://gitlab.com/gitlab-org/gitlab-foss/issues/58390 - */ - plugins.push('babel-plugin-dynamic-import-node'); - presets = [ [ '@babel/preset-env', |