This commit is contained in:
hailin 2025-05-21 13:23:17 +08:00
parent 1ecbdcb984
commit c670150d1d
1 changed files with 4 additions and 3 deletions

View File

@ -5,18 +5,19 @@
/env.js window.RUNTIME_ENV /env.js window.RUNTIME_ENV
Supabase React Supabase React
*/ */
import { Html, Head, Main, NextScript } from "next/document" import { Html, Head, Main, NextScript } from "next/document";
export default function Document() { export default function Document() {
return ( return (
<Html lang="en"> <Html lang="en">
<Head> <Head>
{/* 使用 defer 确保 env.js 加载顺序 */}
<script src="/env.js" defer />
</Head> </Head>
<body> <body>
<Main /> <Main />
<NextScript /> <NextScript />
</body> </body>
</Html> </Html>
) );
} }