preview 최적화 1차#425
Merged
Merged
Conversation
3 tasks
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.
작업 내용
preview 앱의
/show/:showId공연 상세 페이지 Lighthouse 결과를 기준으로 초기 로딩 성능을 개선했습니다.LCP 포스터 이미지 로딩 개선
<link rel="preload" as="image">를 주입합니다.ShowPreview에prioritizeFirstImage옵션을 추가해 preview 실제 페이지에서만 첫 이미지에fetchpriority="high",loading="eager"를 적용합니다.loading="lazy"로 늦게 로드합니다.fetchPrioritycamelCase가 DOM attribute로 정상 처리되지 않아 lowercasefetchpriority를 사용했습니다.포스터 이미지 후보 제공
ShowPreview의images타입을 기존string[]과{ src, thumbnailSrc }[]를 모두 받을 수 있도록 확장했습니다.showImg.path와showImg.thumbnailPath를 함께 전달합니다.srcSet/sizes를 추가해 브라우저가 화면 조건에 맞는 이미지 후보를 선택할 수 있게 했습니다.string[]을 넘기는 사용처는 그대로 동작합니다.폰트 로딩 개선
apps/preview/src/index.css의 Pretendard 외부@import를 제거했습니다.apps/preview/index.html에서cdnjs.cloudflare.compreconnect와 stylesheet preload를 사용하도록 변경했습니다.noscriptfallback을 추가했습니다.지도/QR 등 부가 기능 지연 로딩
PreviewMap은 지도 영역 렌더링 시점에 lazy-load합니다.NavermapsProvider를 제거하고, 지도 영역에서만 provider를 로드하도록 분리했습니다.apps/preview/src/constants/ncp.ts로 모았습니다.변경 영향
ShowPreview는packages/ui공유 컴포넌트라 기존 사용처를 확인했습니다.apps/admin의 공연 미리보기는 기존처럼string[]이미지를 넘기며,prioritizeFirstImage를 사용하지 않으므로 이미지 우선 로딩 정책이 자동 적용되지 않습니다.apps/admin은 기존 top-levelNavermapsProvider구조를 유지합니다.검증
yarn workspace preview type-checkyarn workspace preview buildyarn workspace @boolti/ui type-checkyarn workspace admin type-check빌드 결과 참고
지도 provider 분리 후 preview production build 기준 메인 청크가 약
511.60kB에서482.79kB로 감소했고, Vite의 500kB chunk warning이 사라졌습니다.남은 과제
file.boolti.in의 공식 이미지 변환 규칙이 확인되면 WebP/AVIF 및 width 기반 이미지 URL을 적용할 수 있습니다.thumbnailPath를srcSet후보로 활용하는 수준입니다./show/:showId를 SSR/prerender하면 초기 HTML에 첫 포스터 preload와 show별 메타를 포함할 수 있어 LCP request discovery를 더 강하게 개선할 수 있습니다.