From 2e2673bf89e116735ef4d0750e4b032ccb7e71bc Mon Sep 17 00:00:00 2001 From: Yu Zheng Date: Tue, 30 Jan 2024 19:04:36 +1100 Subject: [PATCH] feat(expo): support cjs and mjs --- .../expo/src/migrations/update-16-6-0/update-metro-config.ts | 2 +- .../src/migrations/update-16-6-0/update-metro-config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/expo/src/migrations/update-16-6-0/update-metro-config.ts b/packages/expo/src/migrations/update-16-6-0/update-metro-config.ts index be6f6caf6cb82..d1f405d7ae4aa 100644 --- a/packages/expo/src/migrations/update-16-6-0/update-metro-config.ts +++ b/packages/expo/src/migrations/update-16-6-0/update-metro-config.ts @@ -53,7 +53,7 @@ const customConfig = { }, resolver: { assetExts: assetExts.filter((ext) => ext !== 'svg'), - sourceExts: [...sourceExts, 'svg'], + sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'], blockList: exclusionList([/^(?!.*node_modules).*\\/dist\\/.*/]), unstable_enableSymlinks: true, unstable_enablePackageExports: true, diff --git a/packages/react-native/src/migrations/update-16-6-0/update-metro-config.ts b/packages/react-native/src/migrations/update-16-6-0/update-metro-config.ts index 035cef9722494..f44285a623d43 100644 --- a/packages/react-native/src/migrations/update-16-6-0/update-metro-config.ts +++ b/packages/react-native/src/migrations/update-16-6-0/update-metro-config.ts @@ -52,7 +52,7 @@ const customConfig = { }, resolver: { assetExts: assetExts.filter((ext) => ext !== 'svg'), - sourceExts: [...sourceExts, 'svg'], + sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'], blockList: exclusionList([/^(?!.*node_modules).*\\/dist\\/.*/]), unstable_enableSymlinks: true, unstable_enablePackageExports: true,