chatdesk-ui/chatdesk-ui/pages/_document.tsx

24 lines
571 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
eslint-disable @next/next/no-sync-scripts
⛔ 请勿删除:
我们在此处强制同步加载 /env.js 用于注入 window.RUNTIME_ENV
以确保运行时 Supabase 等动态配置在 React 启动前就可用。
*/
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>
);
}