-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Problem
Catalyst's current development setup suffers from significant performance issues that impact developer productivity:
- Slow cold start: The dev server takes an excessive amount of time to start because Webpack dev server attempts to build the entire app in memory before becoming available
- Poor hot reloading performance: Hot module replacement is slow, especially when working on large applications
- Suboptimal developer experience: The combination of slow startup and sluggish hot reloading creates friction during development
The root cause is that Webpack dev server tries to build the complete application upfront, which becomes increasingly problematic as application size grows.
Proposed Solution
Migrate from Webpack to Vite as the primary bundler and development server:
Implementation Plan
- Replace dev server: Use Vite's createServer API on the server in development mode
- On-demand module serving: Leverage Vite's ability to serve modules as needed during runtime rather than pre-building everything
- Critical module pre-bundling: Only pre-bundle essential modules during server startup to minimize initial load time
- Runtime module resolution: Allow Vite to handle module serving dynamically based on actual page requirements
Expected Benefits
⚡ Faster cold starts: Vite's on-demand compilation approach will significantly reduce initial startup time
🔄 Improved HMR: Native fast refresh capabilities will provide near-instantaneous hot reloading
📈 Better scalability: Performance will remain consistent even as application size grows
🛠️ Enhanced DX: Overall development experience will improve with faster feedback loops
Metadata
Metadata
Assignees
Labels
No labels