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
@@ -4,9 +4,11 @@ import { execSync } from "child_process";
import path from "path";
import grabConfig from "./grab-config";
import type { BunextConfig } from "../types";
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}`);
@@ -48,6 +50,6 @@ export default async function () {
global.CONFIG = {
...config,
development: true,
development: is_dev,
};
}
+4
View File
@@ -39,6 +39,10 @@ export default function watcher() {
return;
}
if (!filename.match(/\.(tsx?|jsx?)$/)) {
return;
}
if (!filename.match(/^src\/pages\//)) return;
if (filename.match(/\/(--|\()/)) return;
@@ -1,4 +1,4 @@
import path from "path";
import { renderToString } from "react-dom/server";
import grabContants from "../../../utils/grab-constants";
import EJSON from "../../../utils/ejson";
import type { LivePageDistGenParams } from "../../../types";
@@ -21,10 +21,6 @@ export default async function genWebHTML({
const { ClientRootElementIDName, ClientWindowPagePropsName } =
grabContants();
const { renderToString } = await import(
path.join(process.cwd(), "node_modules", "react-dom", "server")
);
if (debug) {
log.info("component", component);
}