-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Goal
Reduce the Windows installer (.exe) size.
Priority
P4 - Optimization - 4-6 hours
Investigation Steps
1. Analyze Current Bundle
- Check what is in the output directory
- Build without packaging to inspect: npx electron-builder --dir
- Analyze node_modules with depcheck and cost-of-modules
2. Common Size Culprits
- Unused dependencies
- Development dependencies bundled
- Large assets (fonts, images)
- Source maps included
- Unminified code
Implementation Details
Remove Unused Dependencies
Run depcheck and remove any unused deps from package.json.
Optimize electron-builder Config
Use asar: true, compression: maximum, and exclude test files, maps, and markdown.
Use ASAR Unpacking Selectively
Only unpack native modules that need it (like node-pty).
Consider UPX Compression
For executable compression (may affect startup time).
Files to Modify
- package.json (remove unused deps, electron-builder config)
- electron.vite.config.ts (optimize build)
Acceptance Criteria
- Document current size
- Reduce by at least 20%
- No functionality lost
- Startup time not significantly affected
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels