Commit b08f2407 authored by Lukas Eipert's avatar Lukas Eipert

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.
parent 1caa760f
...@@ -41,6 +41,11 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') { ...@@ -41,6 +41,11 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
// Jest is running in node environment // Jest is running in node environment
if (BABEL_ENV === 'jest') { if (BABEL_ENV === 'jest') {
plugins.push('@babel/plugin-transform-modules-commonjs'); 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 }; module.exports = { presets, plugins };
...@@ -1466,6 +1466,13 @@ babel-loader@^8.0.5: ...@@ -1466,6 +1466,13 @@ babel-loader@^8.0.5:
mkdirp "^0.5.1" mkdirp "^0.5.1"
util.promisify "^1.0.0" util.promisify "^1.0.0"
babel-plugin-dynamic-import-node@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.2.0.tgz#c0adfb07d95f4a4495e9aaac6ec386c4d7c2524e"
integrity sha512-fP899ELUnTaBcIzmrW7nniyqqdYWrWuJUyPWHxFa/c7r7hS6KC8FscNfLlBNIoPSc55kYMGEEKjPjJGCLbE1qA==
dependencies:
object.assign "^4.1.0"
babel-plugin-istanbul@^5.1.0: babel-plugin-istanbul@^5.1.0:
version "5.1.0" version "5.1.0"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.0.tgz#6892f529eff65a3e2d33d87dc5888ffa2ecd4a30" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.0.tgz#6892f529eff65a3e2d33d87dc5888ffa2ecd4a30"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment