This commit is contained in:
parent
1ecbdcb984
commit
c670150d1d
|
|
@ -5,18 +5,19 @@
|
|||
我们在此处强制同步加载 /env.js 用于注入 window.RUNTIME_ENV,
|
||||
以确保运行时 Supabase 等动态配置在 React 启动前就可用。
|
||||
*/
|
||||
import { Html, Head, Main, NextScript } from "next/document"
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
|
||||
{/* 使用 defer 确保 env.js 加载顺序 */}
|
||||
<script src="/env.js" defer />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue