Fix react and react-dom peer dependencies mismatch #3
This commit is contained in:
+1
-3
@@ -1,5 +1,4 @@
|
||||
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import { renderToReadableStream, renderToString } from "react-dom/server";
|
||||
import grabContants from "../../../utils/grab-constants";
|
||||
import EJSON from "../../../utils/ejson";
|
||||
import isDevelopment from "../../../utils/is-development";
|
||||
@@ -10,8 +9,6 @@ import { AppData } from "../../../data/app-data";
|
||||
import { readFileSync } from "fs";
|
||||
import path from "path";
|
||||
import _ from "lodash";
|
||||
import grabDirNames from "../../../utils/grab-dir-names";
|
||||
const {} = grabDirNames();
|
||||
let _reactVersion = "19";
|
||||
try {
|
||||
_reactVersion = JSON.parse(readFileSync(path.join(process.cwd(), "node_modules/react/package.json"), "utf-8")).version;
|
||||
@@ -19,6 +16,7 @@ try {
|
||||
catch { }
|
||||
export default async function genWebHTML({ component, pageProps, bundledMap, module, routeParams, debug, root_module, }) {
|
||||
const { ClientRootElementIDName, ClientWindowPagePropsName } = grabContants();
|
||||
const { renderToReadableStream } = await import(`${global.DIR_NAMES.ROOT_DIR}/node_modules/react-dom/server.js`);
|
||||
const is_dev = isDevelopment();
|
||||
if (debug) {
|
||||
log.info("component", component);
|
||||
|
||||
+3
-4
@@ -1,5 +1,4 @@
|
||||
import type { BunextPageModule, BunextPageModuleServerReturn, BunxRouteParams } from "../../../types";
|
||||
import type { JSX } from "react";
|
||||
import type { BunextPageModule, BunxRouteParams } from "../../../types";
|
||||
type Params = {
|
||||
file_path: string;
|
||||
debug?: boolean;
|
||||
@@ -8,8 +7,8 @@ type Params = {
|
||||
routeParams?: BunxRouteParams;
|
||||
};
|
||||
export default function grabPageModules({ file_path, debug, url, query, routeParams, }: Params): Promise<{
|
||||
component: JSX.Element;
|
||||
serverRes: BunextPageModuleServerReturn;
|
||||
component: import("react").JSX.Element;
|
||||
serverRes: import("../../../types").BunextPageModuleServerReturn;
|
||||
module: BunextPageModule;
|
||||
root_module: BunextPageModule | undefined;
|
||||
}>;
|
||||
|
||||
@@ -2,8 +2,6 @@ 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 grabPageCombinedServerRes from "./grab-page-combined-server-res";
|
||||
export default async function grabPageModules({ file_path, debug, url, query, routeParams, }) {
|
||||
const now = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user