feat: P1 번들 최적화 - Shiki dynamic import 및 Barrel imports 제거#103
Merged
Conversation
## Changes ### Shiki Dynamic Import - `Code.tsx`에서 static import → dynamic import로 변경 - 코드 블록이 있는 포스트에서만 shiki 라이브러리 로드 - 초기 번들 사이즈 감소 효과 ### Barrel Imports 제거 - `src/types/index.ts` 삭제 - 19개 파일의 import를 직접 경로로 변경 - HeadingType → @/types/headingType - PostType, PostWithoutMarkdownType → @/types/apiResponseType - SearchParamsType → @/types/nextSegmentType - Tree-shaking 최적화 활성화 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Code.tsx에서 static import → dynamic import로 변경하여 초기 번들 사이즈 감소src/types/index.ts삭제 및 19개 파일 직접 import로 변경하여 Tree-shaking 최적화Changes
Shiki Dynamic Import (
bundle-dynamic-imports)src/app/post/[id]/Markdown/_components/Code.tsximport { codeToHtml } from "shiki"→await import("shiki")Barrel Imports 제거 (
bundle-barrel-imports)src/types/index.tsHeadingType→@/types/headingTypePostType,PostWithoutMarkdownType→@/types/apiResponseTypeSearchParamsType→@/types/nextSegmentTypeTest plan
pnpm build)🤖 Generated with Claude Code