Skip to content

Reduce Windows installer size #343

@idofrizler

Description

@idofrizler

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions