Skip to content

Commit 08d982b

Browse files
Add react-grab for development debugging
- Add react-grab package as dev dependency - Load react-grab script in development mode via Next.js Script component
1 parent 286bccb commit 08d982b

File tree

3 files changed

+77
-5
lines changed

3 files changed

+77
-5
lines changed

app/layout.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import { Analytics } from '@vercel/analytics/next'
1414
import type { Metadata } from 'next'
15+
import Script from 'next/script'
1516
import { Toaster } from 'sonner'
1617

1718
import { CommandPalette } from '@/components/CommandPalette/CommandPalette'
@@ -96,6 +97,15 @@ export default function RootLayout({
9697
}) {
9798
return (
9899
<html lang="en" suppressHydrationWarning>
100+
<head>
101+
{process.env.NODE_ENV === 'development' && (
102+
<Script
103+
src="//unpkg.com/react-grab/dist/index.global.js"
104+
crossOrigin="anonymous"
105+
strategy="beforeInteractive"
106+
/>
107+
)}
108+
</head>
99109
<body>
100110
<Providers>
101111
<MSWProvider>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
"playwright": "^1.57.0",
162162
"postcss": "^8.5.6",
163163
"prettier": "^3.7.4",
164+
"react-grab": "^0.0.98",
164165
"storybook": "^10.1.11",
165166
"tailwindcss": "^4.1.18",
166167
"tw-animate-css": "^1.4.0",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)