-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: code splitting chunk by page
- Loading branch information
Showing
18 changed files
with
79 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,5 +132,8 @@ | |
}, | ||
"msw": { | ||
"workerDirectory": "public" | ||
}, | ||
"overrides": { | ||
"react-refresh": "0.11.0" | ||
} | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
import React, { Suspense } from "react"; | ||
import { Routes, Route, Navigate } from "react-router-dom"; | ||
import { CowDogPage, TeamSettingPage, MyPage, ChatListPage, RequestPage, ChatRoom } from ".."; | ||
|
||
export const UserPage = () => { | ||
const CowDogPage = React.lazy(() => import("../CowDogPage/CowDogPage")); | ||
const TeamSettingPage = React.lazy(() => import("../TeamSettingPage/TeamSettingPage")); | ||
const MyPage = React.lazy(() => import("../MyPage/MyPage")); | ||
const ChatListPage = React.lazy(() => import("../ChatListPage/ChatListPage")); | ||
const RequestPage = React.lazy(() => import("../RequestPage/RequestPage")); | ||
const ChatRoom = React.lazy(() => import("../ChatListPage/ChatRoom")); | ||
|
||
const UserPage = () => { | ||
return ( | ||
<Routes> | ||
<Route path="/CowDogPage" element={<CowDogPage />} /> | ||
<Route path="/teamSetting" element={<TeamSettingPage />} /> | ||
<Route path="/mypage/*" element={<MyPage />} /> | ||
<Route path="/chatList" element={<ChatListPage />} /> | ||
<Route path="/Request" element={<RequestPage />} /> | ||
<Route path="/ChatRoom" element={<ChatRoom />} /> | ||
<Route path="*" element={<Navigate to="/" replace />} /> | ||
</Routes> | ||
<Suspense fallback={null}> | ||
<Routes> | ||
<Route path="/CowDogPage" element={<CowDogPage />} /> | ||
<Route path="/teamSetting" element={<TeamSettingPage />} /> | ||
<Route path="/mypage/*" element={<MyPage />} /> | ||
<Route path="/chatList" element={<ChatListPage />} /> | ||
<Route path="/Request" element={<RequestPage />} /> | ||
<Route path="/ChatRoom" element={<ChatRoom />} /> | ||
<Route path="*" element={<Navigate to="/" replace />} /> | ||
</Routes> | ||
</Suspense> | ||
); | ||
}; | ||
|
||
export default UserPage; |
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.