Skip to content

Conversation

@jbroma
Copy link
Member

@jbroma jbroma commented Jun 27, 2025

Summary

  1. Fixed same-origin detection for dev bundle paths: In dev, the bundlePaths in asyncRequire module can stay as paths only e.g. /src/mini.bundle meaning they are split bundles of an mini app of the same origin. This PR fixes the erroneous behaviour where those bundlePaths were marked as coming from different origin and we were skipping loading sync imported shared/remotes for them.

  2. Fixed bundle ID parsing for URL-based paths: In prod, bundleId was being parsed incorrectly - when originalBundlePath was an URL, it would result in incorrect bundleId which would skip loading sync shared & remotes. This PR fixes this by taking into account that bundlePath can be an URL when running getBundleId

  3. Fixed async initialization timing for early shared dependencies: initializeSharing might trigger loading other remotes, and for that we need to have RCTNetworking ready so instead of awaiting initializeSharing and loading __EARLY_SHARED__ after, we only proceed with initializeSharing sync part and then load the __EARLY_SHARED__ immediately - after that's done we proceed to await completion of initializeSharing

  4. Added production bundle path generation for exposed modules: When using MF bundle commands (bundle-mf-host or bundle-mf-remote), exposed modules now generate cleaner paths in the format exposed/{exposeName} instead of the file system path, improving production bundle organization.

  5. Fixed race condition in remote loading: Added proper awaiting of the loading promise in loadRemoteToRegistry to ensure remote modules are fully loaded before proceeding.

  6. Improved origin detection logic: Enhanced isSameOrigin function to properly handle cases where the bundle path is not a fully qualified URL (treating them as same origin), and better distinction between origin URL and public path for more accurate comparisons.

@jbroma jbroma requested a review from Esemesek June 27, 2025 15:35
@github-actions
Copy link

github-actions bot commented Jun 27, 2025

Android Release APK for all devices

🔗 Download link.

Note: if the download link expires, please re-run the workflow to generate a new build.

Generated at 2025-07-01T10:50:05.681Z UTC

@github-actions
Copy link

github-actions bot commented Jun 27, 2025

iOS Release APP for simulators

🔗 Download link.

Note: if the download link expires, please re-run the workflow to generate a new build.

Generated at 2025-07-01T10:50:29.008Z UTC

@jbroma jbroma changed the title fix: mark relative bundle paths as same origin fix: loading sync remotes Jun 27, 2025
@Esemesek Esemesek merged commit 254692d into main Jul 1, 2025
4 checks passed
@Esemesek Esemesek deleted the fix/url-origin-dev branch July 1, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants