one
Version:
One is a React framework for web, iOS, and Android apps.
18 lines (16 loc) • 509 B
JavaScript
function hmrImport(path) {
var runtime = globalThis.__rolldown_runtime__;
if (!runtime || typeof runtime.loadExports !== "function") {
return Promise.reject(new Error("HMR import not supported on native"));
}
var id = path.replace(/^\.\//, "").replace(/^\//, "");
return Promise.resolve().then(function() {
var mod = runtime.loadExports(id);
if (mod == null) {
throw new Error(`no exports for ${id}`);
}
return mod;
});
}
export { hmrImport };
//# sourceMappingURL=hmrImport.native.js.map