Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metro-config): Exclude `beforeAssetSerializationPlugins.preModule…
…s` from `stableChunkSource` (expo#33344) # Why <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Sentry user reported issue with using bundle splitting and `beforeAssetSerializationPlugins` (used by Sentry Expo Metro Plugin). The issue is the `stableChunkSource` becomes unstable due to updated `premodules` by the `beforeAssetSerializationPlugins` getsentry/sentry-react-native#4317 # How <!-- How did you build this feature or fix this bug and why? --> This PR ensures the updated `premodules` are not affecting the chunk global `premodules` but only the serialized output. # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> I've added multiple scenarios to the tests to ensure this regression is avoided in the future. I also tried running the fix with https://github.com/getsentry/sentry-react-native/tree/main/samples/expo and the Web Release build is working with the fix. (Debug is not affected, as premodules are changed only for release.) # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- Loading branch information