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
@@ -16,6 +16,12 @@ export default function grabPageReactComponentString({ file_path, root_file_path
}
tsx += ` )\n`;
tsx += `}\n`;
// Expose the page/root's own exports (meta, Head, config, ...) through
// the bundle so the server never has to import the raw source files.
tsx += `export * as __bunext_page from "${file_path}"\n`;
if (root_file_path) {
tsx += `export * as __bunext_root from "${root_file_path}"\n`;
}
return tsx;
}
catch (error) {