-
Notifications
You must be signed in to change notification settings - Fork 0
[CI] Turborepo 빌드 최적화 적용 #46
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
Changes from all commits
35f3cdc
e1852cf
fed8094
0714d8e
dec4c34
c8dff07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,19 @@ | ||
| "use client"; | ||
|
|
||
| import { QueryClientProvider } from "@tanstack/react-query"; | ||
| import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; | ||
| import dynamic from "next/dynamic"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 이렇게 dynamic 사용하면 번들 크기 최소화할 수가 잇군요! |
||
|
|
||
| import { queryClient } from "@/api/query-client"; | ||
|
|
||
| const ReactQueryDevtools = | ||
| process.env.NODE_ENV === "development" | ||
| ? dynamic(() => | ||
| import("@tanstack/react-query-devtools").then( | ||
| (m) => m.ReactQueryDevtools, | ||
| ), | ||
| ) | ||
| : () => null; | ||
|
Comment on lines
+8
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win Devtools는 SSR 경로에서 제외하는 편이 낫습니다. 지금 구현은 개발 환경에서만 lazy-load 되지만, 변경 예시 const ReactQueryDevtools =
process.env.NODE_ENV === "development"
- ? dynamic(() =>
- import("`@tanstack/react-query-devtools`").then(
- (m) => m.ReactQueryDevtools,
- ),
- )
+ ? dynamic(
+ () =>
+ import("`@tanstack/react-query-devtools`").then(
+ (m) => m.ReactQueryDevtools,
+ ),
+ { ssr: false },
+ )
: () => null;Also applies to: 25-25 🤖 Prompt for AI Agents |
||
|
|
||
| interface QueryProviderProps { | ||
| children: React.ReactNode; | ||
| } | ||
|
|
@@ -13,9 +22,7 @@ export const QueryProvider = ({ children }: QueryProviderProps) => { | |
| return ( | ||
| <QueryClientProvider client={queryClient}> | ||
| {children} | ||
| {process.env.NODE_ENV === "development" ? ( | ||
| <ReactQueryDevtools initialIsOpen={false} /> | ||
| ) : null} | ||
| <ReactQueryDevtools initialIsOpen={false} /> | ||
| </QueryClientProvider> | ||
| ); | ||
| }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. turbo.json에서 ! 붙이면 특정 파일을 빌드 캐시 계산에서 제외할 수 있는지 처음 알았어요!! |
Uh oh!
There was an error while loading. Please reload this page.