Skip to content

[fix] 초기 로드 렌더 차단 리소스 제거 - #1945

Open
seongwon030 wants to merge 2 commits into
develop-fefrom
fix/render-blocking-resources
Open

[fix] 초기 로드 렌더 차단 리소스 제거#1945
seongwon030 wants to merge 2 commits into
develop-fefrom
fix/render-blocking-resources

Conversation

@seongwon030

@seongwon030 seongwon030 commented Aug 23, 2026

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

📝작업 내용

Lighthouse가 짚은 렌더 차단 요청 4건을 추적한 결과, 원인이 서로 다른 두 가지였습니다.

1. react-datepicker가 초기 청크에 딸려오던 문제 (vite.config.ts)

manualChunksreact-datepickerdate-fns를 둘 다 'dates' 청크로 묶고 있었습니다. date-fnsgetDeadLineText.ts, formatTimeAgo.ts메인 진입 경로에서 정적 import 되기 때문에, 관리자 모집 설정 탭에서만 쓰는 react-datepicker까지 초기 그래프로 끌려왔습니다.

react-datepicker'datepicker' 별도 청크로 분리했습니다.

before after
렌더 차단 CSS swiper 7.8KB + dates 22KB swiper 7.8KB
초기 modulepreload (dates) 157KB (gzip 38KB) 53KB (gzip 13.6KB)
datepicker 103.9KB (gzip 25KB) 전 페이지 초기 로드 AdminRoutes 지연 청크로 이동

2. 관리자 전용 폰트가 전체 렌더를 막던 문제 (index.html)

Krona One은 관리자 로그인 화면의 Log in 제목 한 곳(LoginTab.styles.ts:31)에서만 쓰는데, 동기 stylesheet라 관리자 페이지를 볼 일 없는 방문자 전원의 첫 렌더를 잡고 있었습니다. media="print" onload="this.media='all'"로 비동기 로드로 바꿨습니다.

검증 방법

  • vite builddist/index.html에 datepicker 관련 <link>가 없고, AdminRoutes-*.js__vitePreload 의존 목록에만 문자열로 남는 것 확인
  • 빌드 산출물에서 Krona One <link>media="print" onload 속성이 유지되는 것 확인

영향 범위

  • 학생용 화면: 초기 로드 JS·CSS 감소. 렌더 결과는 동일합니다.
  • 관리자용 화면: 모집 설정 탭 진입 시 datepicker 청크를 그때 받습니다(지연 청크로 이동). 로그인 화면의 Log in 제목은 Krona One이 늦게 적용되어 잠깐 폴백 폰트로 보일 수 있습니다.
  • CSP 설정이 없어 인라인 onload 핸들러는 차단되지 않는 것을 확인했습니다.

manualChunks가 react-datepicker와 date-fns를 같은 'dates' 청크로 묶고 있었다.
date-fns는 getDeadLineText 등 메인 진입 경로에서 정적 import되므로, 관리자
화면에서만 쓰는 react-datepicker까지 초기 그래프로 끌려와 JS 103.9KB가
모든 페이지에서 modulepreload되고 CSS 22KB가 렌더를 차단했다.
Krona One은 관리자 로그인 화면의 'Log in' 제목 한 곳에서만 쓰는데,
index.html의 동기 stylesheet라 전체 방문자의 첫 렌더를 막고 있었다.
@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview Aug 23, 2026 1:58pm

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seongwon030, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c67727e4-d10e-49dd-a196-6c5e5ecf7a11

📥 Commits

Reviewing files that changed from the base of the PR and between f5eef03 and 8369744.

📒 Files selected for processing (2)
  • frontend/config/vite.config.ts
  • frontend/index.html

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant