MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / tryLoad

Function tryLoad

packages/vite/hmr/shared/runtime/http-only-boot.ts:61–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 let lastErr: any = null;
60
61 const tryLoad = async () => {
62 for (const origin of originCandidates) {
63 try {
64 const __rtUrl = origin + '/ns/entry-rt';
65 if (verbose) console.info('[ns-entry] trying', __rtUrl);
66 const __mod = await import(/* @vite-ignore */ __rtUrl);
67 const __start = __mod && (__mod.default || __mod);
68 if (typeof __start !== 'function') {
69 throw new Error('entry-rt missing default export');
70 }
71 await __start({ origin, main: mainEntryRelPosix, ver: String(Date.now()), verbose: !!verbose });
72 loaded = true;
73 break;
74 } catch (e) {
75 lastErr = e;
76 }
77 }
78 };
79
80 await tryLoad();
81 if (!loaded) {

Callers 1

startHttpOnlyBootFunction · 0.85

Calls 2

infoMethod · 0.80
StringClass · 0.50

Tested by

no test coverage detected