gitignore 의 *.md / .claude/ 차단을 풀어 다음 파일을 git 으로 추적. - /CLAUDE.md, /AGENTS.md (루트 에이전트 가이드) - .agents/**/*.md (skills 문서 95개) - .claude/settings.json (Claude Code 프로젝트 설정) .claude/worktrees/ 는 git worktree 메타이므로 신규 ignore 라인으로 제외. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
50 lines
920 B
Markdown
50 lines
920 B
Markdown
---
|
|
title: Defer Non-Critical Third-Party Libraries
|
|
impact: MEDIUM
|
|
impactDescription: loads after hydration
|
|
tags: bundle, third-party, analytics, defer
|
|
---
|
|
|
|
## Defer Non-Critical Third-Party Libraries
|
|
|
|
Analytics, logging, and error tracking don't block user interaction. Load them after hydration.
|
|
|
|
**Incorrect (blocks initial bundle):**
|
|
|
|
```tsx
|
|
import { Analytics } from '@vercel/analytics/react'
|
|
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
{children}
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
```
|
|
|
|
**Correct (loads after hydration):**
|
|
|
|
```tsx
|
|
import dynamic from 'next/dynamic'
|
|
|
|
const Analytics = dynamic(
|
|
() => import('@vercel/analytics/react').then(m => m.Analytics),
|
|
{ ssr: false }
|
|
)
|
|
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
{children}
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
```
|