Fix module watcher errors

This commit is contained in:
2026-10-14 12:30:41 +01:00
parent eefb2ea5d2
commit 3025b1681d
9 changed files with 76 additions and 24 deletions
@@ -14,7 +14,11 @@ export default async function grabPageBundledReactComponent({ file_path, return_
// Loader.registry.delete(abs);
const mod = await import(`${abs}?t=${Date.now()}`);
const Main = mod.default;
return { component: Main };
return {
component: Main,
page_module: mod.__bunext_page,
root_module: mod.__bunext_root,
};
}
const { root_file_path } = grabRootFilePath();
let tsx = grabPageReactComponentString({
@@ -35,6 +39,8 @@ export default async function grabPageBundledReactComponent({ file_path, return_
return {
component: Main,
tsx,
page_module: mod.__bunext_page,
root_module: mod.__bunext_root,
};
}
catch (error) {