Skip to content

Instantly share code, notes, and snippets.

@pytqqq
Created April 12, 2023 09:19
Show Gist options
  • Save pytqqq/993ec608a5b0668cc630a4e25b31417d to your computer and use it in GitHub Desktop.
Save pytqqq/993ec608a5b0668cc630a4e25b31417d to your computer and use it in GitHub Desktop.
import { ScriptManager, Federated } from "@callstack/repack/client";
ScriptManager.shared.addResolver(async (scriptId, caller) => {
const resolveURL = Federated.createURLResolver({
containers: {
MiniApp: "http://localhost:9000/[name][ext]",
},
});
const url = resolveURL(scriptId, caller);
if (url) {
return {
url,
query: {
platform: Platform.OS,
},
};
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment