We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a0193e commit d6311faCopy full SHA for d6311fa
1 file changed
pages/_app.tsx
@@ -1,13 +1,22 @@
1
-import { Analytics } from '@vercel/analytics/react';
2
-import { SpeedInsights } from '@vercel/speed-insights/next';
3
import { ThemeProvider } from 'next-themes';
4
import type { AppProps } from 'next/app';
+import dynamic from 'next/dynamic';
5
import { SWRConfig } from 'swr';
6
7
import { Layout } from '@/components/layout';
8
9
import '../styles/globals.css';
10
+const Analytics = dynamic(
11
+ () => import('@vercel/analytics/react').then((m) => m.Analytics),
12
+ { ssr: false },
13
+);
14
+
15
+const SpeedInsights = dynamic(
16
+ () => import('@vercel/speed-insights/next').then((m) => m.SpeedInsights),
17
18
19
20
function MyApp({ Component, pageProps }: AppProps) {
21
return (
22
<>
0 commit comments