Update dev server
This commit is contained in:
@@ -140,8 +140,10 @@ 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}`);
|
||||||
|
if (is_dev) {
|
||||||
fullRebuild();
|
fullRebuild();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return await grabPageErrorComponent({
|
return await grabPageErrorComponent({
|
||||||
error,
|
error,
|
||||||
routeParams,
|
routeParams,
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ 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";
|
import fullRebuild from "../full-rebuild";
|
||||||
|
import isDevelopment from "../../../utils/is-development";
|
||||||
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 is_dev = isDevelopment();
|
||||||
const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } = grabDirNames();
|
const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } = grabDirNames();
|
||||||
const errorRoute = is404 ? "/404" : "/500";
|
const errorRoute = is404 ? "/404" : "/500";
|
||||||
const presetComponent = is404
|
const presetComponent = is404
|
||||||
@@ -52,7 +54,9 @@ export default async function grabPageErrorComponent({ error, routeParams, is404
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
if (is_dev) {
|
||||||
fullRebuild();
|
fullRebuild();
|
||||||
|
}
|
||||||
const DefaultNotFound = () => (_jsxs("div", { style: {
|
const DefaultNotFound = () => (_jsxs("div", { style: {
|
||||||
width: "100vw",
|
width: "100vw",
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/bunext",
|
"name": "@moduletrace/bunext",
|
||||||
"version": "1.1.6",
|
"version": "1.1.7",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -199,8 +199,10 @@ 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}`);
|
||||||
|
|
||||||
|
if (is_dev) {
|
||||||
fullRebuild();
|
fullRebuild();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return await grabPageErrorComponent({
|
return await grabPageErrorComponent({
|
||||||
error,
|
error,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import type {
|
|||||||
import grabPageModules from "./grab-page-modules";
|
import grabPageModules from "./grab-page-modules";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import fullRebuild from "../full-rebuild";
|
import fullRebuild from "../full-rebuild";
|
||||||
|
import isDevelopment from "../../../utils/is-development";
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
error?: any;
|
error?: any;
|
||||||
@@ -23,6 +24,7 @@ export default async function grabPageErrorComponent({
|
|||||||
url,
|
url,
|
||||||
}: Params): Promise<GrabPageComponentRes | Response> {
|
}: Params): Promise<GrabPageComponentRes | Response> {
|
||||||
const router = global.BUNEXT_ROUTER;
|
const router = global.BUNEXT_ROUTER;
|
||||||
|
const is_dev = isDevelopment();
|
||||||
|
|
||||||
const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } =
|
const { BUNX_ROOT_500_PRESET_COMPONENT, BUNX_ROOT_404_PRESET_COMPONENT } =
|
||||||
grabDirNames();
|
grabDirNames();
|
||||||
@@ -84,7 +86,9 @@ export default async function grabPageErrorComponent({
|
|||||||
root_module,
|
root_module,
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
|
if (is_dev) {
|
||||||
fullRebuild();
|
fullRebuild();
|
||||||
|
}
|
||||||
|
|
||||||
const DefaultNotFound: FC = () => (
|
const DefaultNotFound: FC = () => (
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user