fix(blog): 코드 모듈 로딩 실패 시 본문 보존 - #228
Merged
Merged
Conversation
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.
코드·다이어그램 모듈 다운로드가 실패하면 React.lazy의 오류가 라우터까지 전파돼 글 전체가 오류 화면으로 바뀌었습니다. 기존 재시도 로더를 사용해 원본 코드와 본문을 유지하고 해당 블록에서 재시도하도록 바꿉니다. 기존 benchmark 모듈에도 같은 처리를 적용했습니다.
검증: 빌드, lint(오류 0개), 차트 6개·로딩/SSR 8개·SEO 5개 테스트 통과. Chrome에서 CodeBlock과 BenchmarkChart 다운로드를 각각 차단했을 때 본문 보존을 확인했고, 차단 해제 후 재시도로 Mermaid 2개·benchmark 컨트롤 3개가 복구됐습니다.