Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 63d8d63

Browse files
committed
fix(blog): avoid barrel import in client component to fix build
The blog-analytics.tsx client component was importing from the @/lib/blog barrel export, which transitively included content.ts that uses the Node.js fs module. This caused the build to fail with "Module not found: Cannot resolve fs" error. Changed imports to use direct file paths: - Import BlogPost type from @/lib/blog/types - Import analytics functions from @/lib/blog/analytics This avoids pulling content.ts into the client bundle.
1 parent 05416fd commit 63d8d63

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/web-roo-code/src/components/blog/blog-analytics.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
"use client"
22

33
import { useEffect, useRef } from "react"
4-
import type { BlogPost } from "@/lib/blog"
5-
import { trackBlogIndexView, trackBlogPostView, trackBlogPostScrollDepth, trackBlogPostTimeSpent } from "@/lib/blog"
4+
import type { BlogPost } from "@/lib/blog/types"
5+
import {
6+
trackBlogIndexView,
7+
trackBlogPostView,
8+
trackBlogPostScrollDepth,
9+
trackBlogPostTimeSpent,
10+
} from "@/lib/blog/analytics"
611

712
interface BlogIndexAnalyticsProps {
813
postCount: number

0 commit comments

Comments
 (0)