Skip to content

Commit d273e29

Browse files
committed
fix: another hydration attempt
1 parent 8aea397 commit d273e29

File tree

6 files changed

+59
-27
lines changed

6 files changed

+59
-27
lines changed

app/client.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ import { StartClient } from '@tanstack/start'
88

99
const router = createRouter()
1010

11-
hydrateRoot(document, <StartClient router={router} />)
11+
// hydrateRoot(document, <StartClient router={router} />)
12+
hydrateRoot(document.getElementById('root')!, <StartClient router={router} />)

app/routes/__root.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import appCss from '~/styles/app.css?url'
1313
import carbonStyles from '~/styles/carbon.css?url'
1414
import { seo } from '~/utils/seo'
1515
import ogImage from '~/images/og.png'
16-
import { Meta, RouterManagedTag, Scripts } from '@tanstack/start'
16+
import { RouterManagedTag, Scripts, Html, Head, Body } from '@tanstack/start'
1717
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
1818
import { NotFound } from '~/components/NotFound'
1919
import { CgSpinner } from 'react-icons/cg'
@@ -142,14 +142,13 @@ function RootDocument({ children }: { children: React.ReactNode }) {
142142
const showDevtools = showLoading && isRouterPage
143143

144144
return (
145-
<html lang="en">
146-
<head>
147-
<Meta />
145+
<Html lang="en">
146+
<Head>
148147
{matches.find((d) => d.staticData?.baseParent) ? (
149148
<base target="_parent" />
150149
) : null}
151-
</head>
152-
<body>
150+
</Head>
151+
<Body>
153152
<SpeedInsights />
154153
<Analytics />
155154
<React.Suspense fallback={null}>{children}</React.Suspense>
@@ -179,7 +178,7 @@ function RootDocument({ children }: { children: React.ReactNode }) {
179178
) : null}
180179
<ScrollRestoration />
181180
<Scripts />
182-
</body>
183-
</html>
181+
</Body>
182+
</Html>
184183
)
185184
}

app/utils/sentry.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as Sentry from '@sentry/react'
2+
3+
Sentry.init({
4+
dsn: 'https://ac4bfc43ff4a892f8dc7053c4a50d92f@o4507236158537728.ingest.us.sentry.io/4507236163649536',
5+
integrations: [
6+
Sentry.browserTracingIntegration(),
7+
Sentry.replayIntegration(),
8+
],
9+
// Performance Monitoring
10+
tracesSampleRate: 1.0, // Capture 100% of the transactions
11+
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
12+
tracePropagationTargets: ['localhost', /^https:\/\/tanstack\.com\//],
13+
// Session Replay
14+
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
15+
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
16+
})

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"@oramacloud/client": "^1.1.5",
2525
"@remix-run/node": "^2.8.1",
2626
"@tailwindcss/typography": "^0.5.13",
27-
"@tanstack/react-router": "1.31.28",
28-
"@tanstack/router-devtools": "1.31.28",
27+
"@tanstack/react-router": "1.32.0",
28+
"@tanstack/router-devtools": "1.32.0",
2929
"@tanstack/router-vite-plugin": "1.31.18",
30-
"@tanstack/start": "1.31.28",
30+
"@tanstack/start": "1.32.1",
3131
"@typescript-eslint/parser": "^7.2.0",
3232
"@vercel/analytics": "^1.2.2",
3333
"@vercel/speed-insights": "^1.0.10",

pnpm-lock.yaml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineConfig } from "vite";
2+
import { sentryVitePlugin } from "@sentry/vite-plugin";
3+
4+
export default defineConfig({
5+
build: {
6+
sourcemap: true, // Source map generation must be turned on
7+
},
8+
plugins: [
9+
// Put the Sentry vite plugin after all other plugins
10+
sentryVitePlugin({
11+
authToken: process.env.SENTRY_AUTH_TOKEN,
12+
org: "tanstack",
13+
project: "tanstack-com",
14+
}),
15+
],
16+
});

0 commit comments

Comments
 (0)