-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
코드 스플리팅 적용 #567
코드 스플리팅 적용 #567
Conversation
frontend/src/routes/router.tsx
Outdated
@@ -165,11 +169,17 @@ const router = createBrowserRouter( | |||
routesConfig.map((route) => ({ | |||
path: route.path, | |||
element: route.requiresAuth ? ( | |||
<ProtectedRoute>{route.element}</ProtectedRoute> | |||
<Suspense fallback={<div>Loading...</div>}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lazy 로딩을 적용하지 않기로 했는데 Suspense를 제거하지 않는 추가적인 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고마워요 빼야합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 변경된 것 잘 확인헸습니다.
PR의 목적이 무엇인가요?
이슈 ID는 무엇인가요?
설명
코드 스플리팅 적용 및 결과 정리해두었습니다. 이미 공유는 되었겠지만 말씀 드려보면, lazy loading은 효과에 비해 부작용(모든 페이지 로드 시간 소요)이 크기 때문에 적용하지 않았습니다. 아직 우리 앱이 작기 때문에 동적 스플리팅의 효과를 보기는 어려울 것 같습니다. 정적 코드 스플리팅만 적용했습니다. 제 PC, network fast 4g 기준으로 메인 페이지 번들 파일 로드하는 데 걸리는 시간이 9.8초에서 4.8초로 단축되었습니다.
https://www.notion.so/5-6b414bde911b420aaa53f9c02a2c3854?pvs=4
질문 혹은 공유 사항 (Optional)