Remove react/jsx-dev-runtime dynamic browser import
This commit is contained in:
parent
321c8ebb89
commit
dad5cffaac
2
dist/functions/server/start-server.js
vendored
2
dist/functions/server/start-server.js
vendored
@ -5,6 +5,6 @@ export default async function startServer() {
|
|||||||
const serverParams = await serverParamsGen();
|
const serverParams = await serverParamsGen();
|
||||||
const server = Bun.serve(serverParams);
|
const server = Bun.serve(serverParams);
|
||||||
global.SERVER = server;
|
global.SERVER = server;
|
||||||
log.server(`http://localhost:${server.port}`);
|
log.server(`http://${server.hostname}:${server.port}`);
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,10 +50,10 @@ export default async function genWebHTML({ component, pageProps, bundledMap, mod
|
|||||||
"react-dom/client": `https://esm.sh/react-dom@${_reactVersion}/client`,
|
"react-dom/client": `https://esm.sh/react-dom@${_reactVersion}/client`,
|
||||||
"react/jsx-runtime": `https://esm.sh/react@${_reactVersion}/jsx-runtime`,
|
"react/jsx-runtime": `https://esm.sh/react@${_reactVersion}/jsx-runtime`,
|
||||||
};
|
};
|
||||||
if (dev) {
|
// if (dev) {
|
||||||
browser_imports["react/jsx-dev-runtime"] =
|
// browser_imports["react/jsx-dev-runtime"] =
|
||||||
`https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
// `https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
||||||
}
|
// }
|
||||||
const importMap = JSON.stringify({
|
const importMap = JSON.stringify({
|
||||||
imports: browser_imports,
|
imports: browser_imports,
|
||||||
});
|
});
|
||||||
|
|||||||
2
dist/types/index.d.ts
vendored
2
dist/types/index.d.ts
vendored
@ -47,7 +47,7 @@ export type BunextConfig = {
|
|||||||
middleware?: (params: BunextConfigMiddlewareParams) => Promise<Response | Request | undefined> | Response | Request | undefined;
|
middleware?: (params: BunextConfigMiddlewareParams) => Promise<Response | Request | undefined> | Response | Request | undefined;
|
||||||
defaultCacheExpiry?: number;
|
defaultCacheExpiry?: number;
|
||||||
websocket?: WebSocketHandler<any>;
|
websocket?: WebSocketHandler<any>;
|
||||||
serverOptions?: Bun.Serve.Options<any>;
|
serverOptions?: Omit<Bun.Serve.Options<any>, "fetch" | "routes">;
|
||||||
};
|
};
|
||||||
export type BunextConfigMiddlewareParams = {
|
export type BunextConfigMiddlewareParams = {
|
||||||
req: Request;
|
req: Request;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "@moduletrace/bunext",
|
"name": "@moduletrace/bunext",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.0.33",
|
"version": "1.0.34",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export default async function startServer() {
|
|||||||
|
|
||||||
global.SERVER = server;
|
global.SERVER = server;
|
||||||
|
|
||||||
log.server(`http://localhost:${server.port}`);
|
log.server(`http://${server.hostname}:${server.port}`);
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,10 +76,10 @@ export default async function genWebHTML({
|
|||||||
"react/jsx-runtime": `https://esm.sh/react@${_reactVersion}/jsx-runtime`,
|
"react/jsx-runtime": `https://esm.sh/react@${_reactVersion}/jsx-runtime`,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dev) {
|
// if (dev) {
|
||||||
browser_imports["react/jsx-dev-runtime"] =
|
// browser_imports["react/jsx-dev-runtime"] =
|
||||||
`https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
// `https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const importMap = JSON.stringify({
|
const importMap = JSON.stringify({
|
||||||
imports: browser_imports,
|
imports: browser_imports,
|
||||||
|
|||||||
@ -64,7 +64,7 @@ export type BunextConfig = {
|
|||||||
| undefined;
|
| undefined;
|
||||||
defaultCacheExpiry?: number;
|
defaultCacheExpiry?: number;
|
||||||
websocket?: WebSocketHandler<any>;
|
websocket?: WebSocketHandler<any>;
|
||||||
serverOptions?: Bun.Serve.Options<any>;
|
serverOptions?: Omit<Bun.Serve.Options<any>, "fetch" | "routes">;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BunextConfigMiddlewareParams = {
|
export type BunextConfigMiddlewareParams = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user