fix: resolve Vite build warnings for mixed static/dynamic imports #473
Reference in New Issue
Block a user
Delete Branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR resolves Vite build warnings about mixed static and dynamic imports that were preventing proper code-splitting.
Changes
main-axios.tsto static imports across 10 filessonnerto static imports across 4 filesvite.config.tsfor better bundle splitting:react-vendor: React and React DOMui-vendor: Radix UI components, lucide-react, clsx, tailwind-mergemonaco: Monaco Editorcodemirror: CodeMirror and related packageschunkSizeWarningLimitto 1000kBFiles Modified
src/ui/desktop/DesktopApp.tsxsrc/ui/desktop/navigation/hosts/Host.tsxsrc/ui/desktop/apps/host-manager/hosts/HostManagerViewer.tsxsrc/ui/desktop/apps/host-manager/hosts/HostManagerEditor.tsxsrc/ui/desktop/apps/features/server-stats/ServerStats.tsxsrc/ui/desktop/apps/features/tunnel/TunnelManager.tsxsrc/ui/desktop/apps/features/docker/DockerManager.tsxsrc/ui/desktop/apps/features/terminal/Terminal.tsxsrc/ui/desktop/user/UserProfile.tsxsrc/ui/desktop/apps/host-manager/credentials/CredentialSelector.tsxsrc/ui/desktop/apps/dashboard/apps/alerts/AlertManager.tsxsrc/ui/main-axios.tsvite.config.tsTest Plan
Before
After
Build completes cleanly with proper chunking:
🤖 Generated with Claude Code
LGTM. Considered doing this for a while, but never got around to it. Thanks.