Skip to content

Commit 9ec6c86

Browse files
committed
Fixing Jest for Babel 7 in Plugins.
Due to a change in Babel 7 that affects resolution of babel configs[1] (`.babelrc` is now a hierarchical config, while `babel.config.js` is not), source files outside of the source root of jest will not be transpiled. That means, plugins running tests were not able to require/import source files of core. With this change, `.babelrc` will be renamed to `babel.config.js`, so it is still used when a plugin imports a file from core. [1]: jestjs/jest#6053 (comment)
1 parent 83a61de commit 9ec6c86

File tree

5 files changed

+36
-6632
lines changed

5 files changed

+36
-6632
lines changed

graylog2-web-interface/.babelrc

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
presets: ['@babel/env', '@babel/react', '@babel/flow'],
3+
plugins: [
4+
'@babel/plugin-syntax-dynamic-import',
5+
'@babel/plugin-proposal-class-properties',
6+
'add-module-exports',
7+
],
8+
env: {
9+
test: {
10+
plugins: ['babel-plugin-dynamic-import-node'],
11+
},
12+
},
13+
};

0 commit comments

Comments
 (0)