Skip to content

Conversation

@longb1997
Copy link
Contributor

Summary

This pull request adds support for the file protocol in the ScriptManager module for both Android (ScriptManagerModule.kt) and iOS (ScriptManager.mm). The change enables loading scripts directly from the local filesystem, addressing scenarios where scripts are stored locally rather than fetched remotely via HTTP/HTTPS.

This enhances the flexibility of the script loading mechanism in Re.pack.The changes include:

On Android: Added a condition in ScriptManagerModule.kt to handle file protocol URLs by delegating to fileSystemLoader.load.
On iOS: Added a condition in ScriptManager.mm to handle file protocol URLs by calling executeFromFilesystem.

resolve #1148

Test plan

build a bundle mini app then load it locally

@changeset-bot
Copy link

changeset-bot bot commented Aug 1, 2025

🦋 Changeset detected

Latest commit: 1f3618b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-dev-server Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repack-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2025 4:12pm

@jbroma
Copy link
Member

jbroma commented Aug 4, 2025

@longb1997 I'll try to review this week, thank you for your patience

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@jbroma jbroma merged commit 0afd84b into callstack:main Aug 10, 2025
5 checks passed
@jbroma
Copy link
Member

jbroma commented Aug 10, 2025

Thank you for your contribution @longb1997, these are very meaningful fixes! 🎉

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.

[Re.pack v5 + MF2] Cannot load bundle from local path

3 participants