feat(App): implement code-splitting for improved performance and user experience
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 56s
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 56s
- Refactored the App component to utilize React's lazy loading for page components, enhancing load times and performance. - Introduced a fallback UI with a spinner during component loading, improving user feedback during navigation. - Updated the AuthContext to use useCallback and useMemo for optimized performance in login and logout functions, reducing unnecessary re-renders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
85163ad440
commit
1c268555f6
3 files changed
+107
-46
No files matched your search
+29
-2
@@ -9,6 +9,33 @@ export default defineConfig({
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: false
|
||||
}
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return
|
||||
if (id.includes('jspdf')) return 'vendor-pdf'
|
||||
if (id.includes('lucide-react')) return 'vendor-icons'
|
||||
if (
|
||||
id.includes('react-markdown') ||
|
||||
id.includes('/marked/') ||
|
||||
id.includes('remark-') ||
|
||||
id.includes('mdast') ||
|
||||
id.includes('micromark') ||
|
||||
id.includes('unist')
|
||||
) {
|
||||
return 'vendor-markdown'
|
||||
}
|
||||
if (id.includes('react-router')) return 'vendor-router'
|
||||
if (
|
||||
/[/\\]node_modules[/\\]react-dom[/\\]/.test(id) ||
|
||||
/[/\\]node_modules[/\\]react[/\\]/.test(id) ||
|
||||
/[/\\]node_modules[/\\]scheduler[/\\]/.test(id)
|
||||
) {
|
||||
return 'vendor-react'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user