diff options
Diffstat (limited to 'babel.config.js')
-rw-r--r-- | babel.config.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/babel.config.js b/babel.config.js index a38edf1d6..0baec0c3c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,11 +1,17 @@ module.exports = function (api) { api.cache(true) + const isTestEnv = process.env.NODE_ENV === 'test' return { presets: [ [ 'babel-preset-expo', { lazyImports: true, + native: { + // Disable ESM -> CJS compilation because Metro takes care of it. + // However, we need it in Jest tests since those run without Metro. + disableImportExportTransform: !isTestEnv, + }, }, ], ], |