Update watcher and component gen functions

This commit is contained in:
2026-04-04 20:02:36 +01:00
parent 48c25d2fb4
commit f34f8baa99
11 changed files with 15 additions and 20 deletions
@@ -79,6 +79,7 @@ export default async function watcherEsbuildCTX() {
if (!filename.match(/^src\/pages\/|\.css$/)) return;
if (filename.match(/\/(--|\()/)) return;
if (filename.match(/ /)) return;
if (global.RECOMPILING) return;
+1 -1
View File
@@ -59,7 +59,7 @@ export default async function watcher() {
}
if (!filename.match(/^src\/pages\/|\.css$/)) return;
if (filename.match(/\/(--|\()/)) return;
if (filename.match(/\/(--|\(| )/)) return;
if (global.RECOMPILING) return;
@@ -1,7 +1,7 @@
import type { JSX } from "react";
import type { GrabPageReactBundledComponentRes } from "../../../types";
import grabPageReactComponentString from "./grab-page-react-component-string";
import grabTsxStringModule from "./grab-tsx-string-module";
import { log } from "../../../utils/log";
type Params = {
file_path: string;
@@ -35,6 +35,7 @@ export default async function grabPageBundledReactComponent({
tsx,
};
} catch (error: any) {
log.error(`grabPageBundledReactComponent Error: ${error.message}`);
return undefined;
}
}
@@ -1,19 +1,8 @@
import grabRouteParams from "../../../utils/grab-route-params";
import type {
BunextPageModule,
BunextPageModuleServerReturn,
BunextPageServerModule,
BunextRootModule,
BunxRouteParams,
GrabPageComponentRes,
} from "../../../types";
import type { BunxRouteParams, GrabPageComponentRes } from "../../../types";
import grabPageErrorComponent from "./grab-page-error-component";
import grabPageBundledReactComponent from "./grab-page-bundled-react-component";
import _ from "lodash";
import { log } from "../../../utils/log";
import grabRootFilePath from "./grab-root-file-path";
import grabPageServerRes from "./grab-page-server-res";
import grabPageServerPath from "./grab-page-server-path";
import grabPageModules from "./grab-page-modules";
import grabPageCombinedServerRes from "./grab-page-combined-server-res";
@@ -1,4 +1,5 @@
import EJSON from "../../../utils/ejson";
import { log } from "../../../utils/log";
import pagePathTransform from "../../../utils/page-path-transform";
type Params = {
@@ -47,6 +48,7 @@ export default function grabPageReactComponentString({
return tsx;
} catch (error: any) {
log.error(`grabPageReactComponentString Error: ${error.message}`);
return undefined;
}
}