3 const presets = ['@babel/preset-env'];
4 const plugins = ['@babel/plugin-transform-runtime'];
6 // Jest is running in node environment, so we need additional plugins
7 const isJest = !!process.env.JEST_WORKER_ID;
9 plugins.push('@babel/plugin-transform-modules-commonjs');
13 sourceType: 'unambiguous', // supports mixing commonjs and es modules https://github.com/webpack/webpack/issues/4039#issuecomment-498033015