Skip to content

Commit

Permalink
refactor: use lazy load routes to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Apr 2, 2024
1 parent a5fb9e4 commit cd06026
Show file tree
Hide file tree
Showing 21 changed files with 169 additions and 203 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
alias: {
map: [
["@", "./src"],
["@root", "./"],
["~", "./"],
],
extensions: [".tsx", ".ts", ".jsx", ".js", ".mjs", ".cjs"],
},
Expand Down
2 changes: 1 addition & 1 deletion backend/tauri/src/utils/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub fn create_window(app_handle: &AppHandle) {
let mut builder = tauri::window::WindowBuilder::new(
app_handle,
"main".to_string(),
tauri::WindowUrl::App("index.html".into()),
tauri::WindowUrl::App("/proxies".into()),
)
.title("Clash Nyanpasu")
.fullscreen(false)
Expand Down
2 changes: 1 addition & 1 deletion src/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@dnd-kit/utilities": "3.2.2",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@generouted/react-router": "^1.18.5",
"@juggle/resize-observer": "3.4.0",
"@mui/icons-material": "5.15.14",
"@mui/lab": "5.0.0-alpha.169",
Expand Down
Loading

0 comments on commit cd06026

Please sign in to comment.