Remove react/jsx-dev-runtime dynamic browser import
This commit is contained in:
+1
-1
@@ -5,6 +5,6 @@ export default async function startServer() {
|
||||
const serverParams = await serverParamsGen();
|
||||
const server = Bun.serve(serverParams);
|
||||
global.SERVER = server;
|
||||
log.server(`http://localhost:${server.port}`);
|
||||
log.server(`http://${server.hostname}:${server.port}`);
|
||||
return server;
|
||||
}
|
||||
|
||||
+4
-4
@@ -50,10 +50,10 @@ export default async function genWebHTML({ component, pageProps, bundledMap, mod
|
||||
"react-dom/client": `https://esm.sh/react-dom@${_reactVersion}/client`,
|
||||
"react/jsx-runtime": `https://esm.sh/react@${_reactVersion}/jsx-runtime`,
|
||||
};
|
||||
if (dev) {
|
||||
browser_imports["react/jsx-dev-runtime"] =
|
||||
`https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
||||
}
|
||||
// if (dev) {
|
||||
// browser_imports["react/jsx-dev-runtime"] =
|
||||
// `https://esm.sh/react@${_reactVersion}/jsx-dev-runtime`;
|
||||
// }
|
||||
const importMap = JSON.stringify({
|
||||
imports: browser_imports,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user