Don't compile Hermes-supported features with Babel (#1773)

* Don't transpile Hermes-supported features

* Disable the object spread plugin

We're using Hermes, and Hermes supports object spread.
We can remove this patch when we upgrade Expo because it'll be conditional there.
This commit is contained in:
dan
2023-10-31 00:23:01 +00:00
committed by GitHub
parent e1dcedd87e
commit 515c9d5529
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -8,6 +8,9 @@ module.exports = function (api) {
{
lazyImports: true,
native: {
// We should be able to remove this after upgrading Expo
// to a version that includes https://github.com/expo/expo/pull/24672.
unstable_transformProfile: 'hermes-stable',
// Disable ESM -> CJS compilation because Metro takes care of it.
// However, we need it in Jest tests since those run without Metro.
disableImportExportTransform: !isTestEnv,