Bugfixes: update types, update imports, update init function.

This commit is contained in:
2026-03-21 13:47:40 +01:00
parent 3545b6dc08
commit d3336b48c7
8 changed files with 31 additions and 11 deletions
+3 -1
View File
@@ -3,8 +3,10 @@ import grabDirNames from "../utils/grab-dir-names";
import { execSync } from "child_process";
import path from "path";
import grabConfig from "./grab-config";
import isDevelopment from "../utils/is-development";
export default async function () {
const dirNames = grabDirNames();
const is_dev = isDevelopment();
execSync(`rm -rf ${dirNames.BUNEXT_CACHE_DIR}`);
execSync(`rm -rf ${dirNames.BUNX_CWD_MODULE_CACHE_DIR}`);
try {
@@ -31,6 +33,6 @@ export default async function () {
const config = (await grabConfig()) || {};
global.CONFIG = {
...config,
development: true,
development: is_dev,
};
}
+3
View File
@@ -30,6 +30,9 @@ export default function watcher() {
}
return;
}
if (!filename.match(/\.(tsx?|jsx?)$/)) {
return;
}
if (!filename.match(/^src\/pages\//))
return;
if (filename.match(/\/(--|\()/))
+1 -2
View File
@@ -1,5 +1,5 @@
import { jsx as _jsx } from "react/jsx-runtime";
import path from "path";
import { renderToString } from "react-dom/server";
import grabContants from "../../../utils/grab-constants";
import EJSON from "../../../utils/ejson";
import isDevelopment from "../../../utils/is-development";
@@ -9,7 +9,6 @@ import { log } from "../../../utils/log";
import { AppData } from "../../../data/app-data";
export default async function genWebHTML({ component, pageProps, bundledMap, head: Head, module, meta, routeParams, debug, }) {
const { ClientRootElementIDName, ClientWindowPagePropsName } = grabContants();
const { renderToString } = await import(path.join(process.cwd(), "node_modules", "react-dom", "server"));
if (debug) {
log.info("component", component);
}