mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-23 00:45:28 +00:00
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.
This commit is contained in:
@ -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 };
|
||||
|
Reference in New Issue
Block a user