Skip to content
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

페이지 컴포넌트들 코드스플리팅 적용 #346

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

dlwl98
Copy link
Member

@dlwl98 dlwl98 commented Nov 27, 2023

⚙️ PR 타입

  • Feature
  • Hotfix

✨ 기능 설명 or 🚨 문제 상황

페이지 컴포넌트들 코드스플리팅 적용

👨‍💻 구현 내용 or 👍 해결 내용

feat: page components lazy import 적용

🎯 PR 포인트

📝 참고 사항

저희가 페이지들을 다 named exports 를 해서 lazy함수를 사용할 때 불편하더라구요

// default exports의 경우
const AllServicesPage = lazy(() => import('@pages/AllServicesPage'))

// named exports의 경우 2가지 방법
const AllServicesPage = lazy(() =>
  import('@pages/AllServicesPage').then(({ AllServicesPage }) => ({
    default: AllServicesPage,
  }))
);

const AllServicesPage = lazy(async () => ({
  default: (await import('@pages/AllServicesPage')).AllServicesPage,
}));

이 부분 재사용할 수 있는 함수 만들어두었습니다.

❓ 궁금한 점

@dlwl98 dlwl98 added the 기능 코드의 기능이 추가되거나 바뀌었습니다. label Nov 27, 2023
@dlwl98 dlwl98 self-assigned this Nov 27, 2023
@dlwl98 dlwl98 linked an issue Nov 27, 2023 that may be closed by this pull request
@dlwl98
Copy link
Member Author

dlwl98 commented Nov 27, 2023

🎉 @dlwl98 님 랜덤 리뷰어로 당첨되셨습니다! 리뷰를 부탁드립니다. 🙏

@dlwl98 dlwl98 merged commit 5601dd9 into dev Nov 27, 2023
@dlwl98 dlwl98 deleted the feat/#344-page-code-spliting branch November 27, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
기능 코드의 기능이 추가되거나 바뀌었습니다.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

페이지 컴포넌트들 코드스플리팅 적용
2 participants