Update dev server

This commit is contained in:
2026-08-14 12:59:20 +01:00
parent f590deb11b
commit 247a64c873
5 changed files with 8 additions and 10 deletions
+1 -4
View File
@@ -131,8 +131,6 @@ export default async function grabPageComponent(params) {
await serverPostBuildFn(); await serverPostBuildFn();
return component_retried; return component_retried;
} }
global.BUNEXT_PAGES_SRC_WATCHER?.close();
watcherEsbuildCTX();
} }
global.BUNEXT_REBUILD_RETRIES = 0; global.BUNEXT_REBUILD_RETRIES = 0;
} }
@@ -142,8 +140,7 @@ export default async function grabPageComponent(params) {
else { else {
log.error(`Error Grabbing Page Component: ${error.message}`); log.error(`Error Grabbing Page Component: ${error.message}`);
log.error(`Page: ${passed_file_path || url?.pathname}`); log.error(`Page: ${passed_file_path || url?.pathname}`);
global.BUNEXT_PAGES_SRC_WATCHER?.close(); fullRebuild();
watcherEsbuildCTX();
} }
return await grabPageErrorComponent({ return await grabPageErrorComponent({
error, error,
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import grabDirNames from "../../../utils/grab-dir-names"; import grabDirNames from "../../../utils/grab-dir-names";
import grabPageModules from "./grab-page-modules"; import grabPageModules from "./grab-page-modules";
import _ from "lodash"; import _ from "lodash";
import fullRebuild from "../full-rebuild";
export default async function grabPageErrorComponent({ error, routeParams, is404, url, }) { export default async function grabPageErrorComponent({ error, routeParams, is404, url, }) {
const router = global.BUNEXT_ROUTER; const router = global.BUNEXT_ROUTER;
const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } = grabDirNames(); const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } = grabDirNames();
@@ -51,6 +52,7 @@ export default async function grabPageErrorComponent({ error, routeParams, is404
}; };
} }
catch { catch {
fullRebuild();
const DefaultNotFound = () => (_jsxs("div", { style: { const DefaultNotFound = () => (_jsxs("div", { style: {
width: "100vw", width: "100vw",
height: "100vh", height: "100vh",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/bunext", "name": "@moduletrace/bunext",
"version": "1.1.5", "version": "1.1.6",
"main": "dist/index.js", "main": "dist/index.js",
"module": "index.ts", "module": "index.ts",
"dependencies": { "dependencies": {
@@ -188,9 +188,6 @@ export default async function grabPageComponent(
await serverPostBuildFn(); await serverPostBuildFn();
return component_retried; return component_retried;
} }
global.BUNEXT_PAGES_SRC_WATCHER?.close();
watcherEsbuildCTX();
} }
global.BUNEXT_REBUILD_RETRIES = 0; global.BUNEXT_REBUILD_RETRIES = 0;
@@ -202,8 +199,7 @@ export default async function grabPageComponent(
log.error(`Error Grabbing Page Component: ${error.message}`); log.error(`Error Grabbing Page Component: ${error.message}`);
log.error(`Page: ${passed_file_path || url?.pathname}`); log.error(`Page: ${passed_file_path || url?.pathname}`);
global.BUNEXT_PAGES_SRC_WATCHER?.close(); fullRebuild();
watcherEsbuildCTX();
} }
return await grabPageErrorComponent({ return await grabPageErrorComponent({
@@ -7,6 +7,7 @@ import type {
} from "../../../types"; } from "../../../types";
import grabPageModules from "./grab-page-modules"; import grabPageModules from "./grab-page-modules";
import _ from "lodash"; import _ from "lodash";
import fullRebuild from "../full-rebuild";
type Params = { type Params = {
error?: any; error?: any;
@@ -83,6 +84,8 @@ export default async function grabPageErrorComponent({
root_module, root_module,
}; };
} catch { } catch {
fullRebuild();
const DefaultNotFound: FC = () => ( const DefaultNotFound: FC = () => (
<div <div
style={{ style={{