mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
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.
This commit is contained in:
parent
05416fd21d
commit
63d8d63f48
1 changed files with 7 additions and 2 deletions
|
|
@ -1,8 +1,13 @@
|
|||
"use client"
|
||||
|
||||
import { useEffect, useRef } from "react"
|
||||
import type { BlogPost } from "@/lib/blog"
|
||||
import { trackBlogIndexView, trackBlogPostView, trackBlogPostScrollDepth, trackBlogPostTimeSpent } from "@/lib/blog"
|
||||
import type { BlogPost } from "@/lib/blog/types"
|
||||
import {
|
||||
trackBlogIndexView,
|
||||
trackBlogPostView,
|
||||
trackBlogPostScrollDepth,
|
||||
trackBlogPostTimeSpent,
|
||||
} from "@/lib/blog/analytics"
|
||||
|
||||
interface BlogIndexAnalyticsProps {
|
||||
postCount: number
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue