Updates
This commit is contained in:
@@ -70,6 +70,14 @@ export default async function genWebHTML({
|
||||
|
||||
const final_meta = _.merge(root_meta, page_meta);
|
||||
|
||||
// const public_envs = Object.keys(process.env).filter((e) =>
|
||||
// e.startsWith(`NEXT_PUBLIC_`),
|
||||
// );
|
||||
|
||||
const client_process = {
|
||||
env: {},
|
||||
};
|
||||
|
||||
let final_component = (
|
||||
<html {...html_props}>
|
||||
<head>
|
||||
@@ -92,7 +100,7 @@ export default async function genWebHTML({
|
||||
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.${ClientWindowPagePropsName} = ${serializedProps}`,
|
||||
__html: `window.${ClientWindowPagePropsName} = ${serializedProps};\nwindow.process = ${JSON.stringify(client_process)}`,
|
||||
}}
|
||||
data-bunext-head
|
||||
/>
|
||||
|
||||
@@ -13,7 +13,9 @@ export default async function handleWebPages({
|
||||
req,
|
||||
}: Params): Promise<Response> {
|
||||
try {
|
||||
if (!isDevelopment()) {
|
||||
const is_dev = isDevelopment();
|
||||
|
||||
if (!is_dev) {
|
||||
const url = new URL(req.url);
|
||||
const key = url.pathname + (url.search || "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user