import { __export, __toCommonJS, __toESM } from 'rolldown:runtime';
export class DevRuntime {
modules = {};
createModuleHotContext(_moduleId) {
throw new Error('createModuleHotContext should be implemented');
}
applyUpdates(_boundaries) {
throw new Error('applyUpdates should be implemented');
}
registerModule(id, module) {
this.modules[id] = module;
}
loadExports(id) {
const module = this.modules[id];
if (module) {
return module.exports;
} else {
console.warn(`Module ${id} not found`);
return {};
}
}
createEsmInitializer = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
createCjsInitializer =
(cb, mod) =>
() => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
__toESM = __toESM;
__toCommonJS = __toCommonJS;
__export = __export;
}