[26기] SSR 환경에서 lottie-web Import시 발생하는 오류 수정 #190
Merged
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.
📘 작업 유형
📑 작업리스트
Node.js v22에서navigator가 정의되어 발생하는 SSR 오류 해결lottie-web을dynamic import방식으로 변경하여 브라우저 환경에서만 실행되도록 수정animationData에.default접근 방식 적용 (ES Module import 구조 대응)🚧 특이 사항
lottie-web은 이제 클라이언트에서만 동작하므로,loadAnimation()호출은useEffect내부에서만 실행됩니다.SSR 환경에서도 문제없이 빌드 및 실행되는지 확인해 주세요 (특히 yarn build, yarn start).
JSON import는
dynamic import로 바뀌었고,.default를 통해 실제 데이터에 접근하고 있습니다