-
Notifications
You must be signed in to change notification settings - Fork 2
Experimental speed enhancements #67
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements experimental speed enhancements that significantly reduce the bundle size and improve load performance. Key changes include:
- Lazy loading of non-critical routes and components.
- Manual chunking and build optimizations in the Vite configuration.
- Addition of preconnect and preload hints in the HTML for faster resource loading.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/renderer/vite.config.js | Updated build config with manual chunking, conditional sourcemaps, and Terser minification settings. |
packages/renderer/src/plugins/router.ts | Converted route components to lazy loaded functions to optimize performance. |
packages/renderer/src/App.vue | Adjusted component import ordering for audio and video players. |
packages/renderer/indexBrowser.html | Added preconnect and preload tags to optimize external resource loading. |
Comments suppressed due to low confidence (1)
packages/renderer/vite.config.js:84
- [nitpick] Consider renaming the variable 'dépendsÀExclure' to use ASCII characters for consistency and to avoid potential issues in toolchains.
external: dépendsÀExclure,
packages/renderer/vite.config.js
8000
Outdated
const facadeModuleId = chunkInfo.facadeModuleId ? chunkInfo.facadeModuleId.split('/').pop() : 'chunk'; | ||
return `${facadeModuleId}-[hash].js`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The generated chunk file names may collide if multiple modules have the same base name; consider incorporating additional identifiers to ensure uniqueness.
const facadeModuleId = chunkInfo.facadeModuleId ? chunkInfo.facadeModuleId.split('/').pop() : 'chunk'; | |
return `${facadeModuleId}-[hash].js`; | |
const facadeModuleId = chunkInfo.facadeModuleId || 'chunk'; | |
const baseName = facadeModuleId.split('/').pop(); | |
const dirName = facadeModuleId.split('/').slice(-2, -1)[0] || 'unknown'; | |
const sanitizedDirName = dirName.replace(/[^a-zA-Z0-9_-]/g, ''); | |
return `${sanitizedDirName}-${baseName}-[hash].js`; |
Copilot uses AI. Check for mistakes.
Via Claude Code.