summaryrefslogtreecommitdiff
path: root/babel.config.js
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2019-03-05 10:07:16 +0100
committerLukas Eipert <leipert@gitlab.com>2019-03-05 15:15:06 +0100
commitb08f2407c19a0eb2c0cadbdf710ab6d56326d1d9 (patch)
tree08a1fcb84436aff3dfff608e34071a06d281adee /babel.config.js
parent1caa760f5d2d0df1c29df6bf376ce1037785250f (diff)
downloadgitlab-ce-b08f2407c19a0eb2c0cadbdf710ab6d56326d1d9.tar.gz
Re-add babel plugins for dynamic imports
With https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25597 we also removed the babel-plugin-dynamic-import-node. It is now throwing errors when we run jest with coverage.
Diffstat (limited to 'babel.config.js')
-rw-r--r--babel.config.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/babel.config.js b/babel.config.js
index e3db4dcbc9a..78d14095b0b 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -41,6 +41,11 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
// Jest is running in node environment
if (BABEL_ENV === 'jest') {
plugins.push('@babel/plugin-transform-modules-commonjs');
+ /*
+ without the following, babel-plugin-istanbul throws an error:
+ https://gitlab.com/gitlab-org/gitlab-ce/issues/58390
+ */
+ plugins.push('babel-plugin-dynamic-import-node');
}
module.exports = { presets, plugins };