mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
perf: force-static
This commit is contained in:
parent
4671ee3aaf
commit
99ead50d1c
@ -35,6 +35,8 @@ export const viewport: Viewport = {
|
|||||||
userScalable: false,
|
userScalable: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const dynamic = "force-static";
|
||||||
|
|
||||||
export default function LocaleLayout({
|
export default function LocaleLayout({
|
||||||
children,
|
children,
|
||||||
params: { locale },
|
params: { locale },
|
||||||
@ -45,9 +47,9 @@ export default function LocaleLayout({
|
|||||||
const messages = useMessages();
|
const messages = useMessages();
|
||||||
return (
|
return (
|
||||||
<html lang={locale} suppressHydrationWarning>
|
<html lang={locale} suppressHydrationWarning>
|
||||||
<head>
|
{/* <head>
|
||||||
<PublicEnvScript />
|
<PublicEnvScript />
|
||||||
</head>
|
</head> */}
|
||||||
<body
|
<body
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-h-screen bg-background font-sans antialiased",
|
"min-h-screen bg-background font-sans antialiased",
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
import withBundleAnalyzer from "@next/bundle-analyzer";
|
||||||
|
|
||||||
|
const bundleAnalyzer = withBundleAnalyzer({
|
||||||
|
enabled: process.env.ANALYZE === "true",
|
||||||
|
});
|
||||||
|
|
||||||
import createNextIntlPlugin from "next-intl/plugin";
|
import createNextIntlPlugin from "next-intl/plugin";
|
||||||
const withNextIntl = createNextIntlPlugin();
|
const withNextIntl = createNextIntlPlugin();
|
||||||
import withPWAInit from "@ducanh2912/next-pwa";
|
import withPWAInit from "@ducanh2912/next-pwa";
|
||||||
@ -16,5 +22,10 @@ const withPWA = withPWAInit({
|
|||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
|
logging: {
|
||||||
|
fetches: {
|
||||||
|
fullUrl: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
export default withPWA(withNextIntl(nextConfig));
|
export default bundleAnalyzer(withPWA(withNextIntl(nextConfig)));
|
||||||
|
Loading…
Reference in New Issue
Block a user