Skip to content

Task 016: Make Vite visualizer opt-in and use one compression algo - #14

Merged
Igloczek merged 3 commits into
masterfrom
task/016-optimize-vite-build-plugins
Jun 30, 2026
Merged

Igloczek merged 3 commits into
masterfrom
task/016-optimize-vite-build-plugins

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/016-optimize-vite-build-plugins.md from the ponytail audit backlog.

Goal

Reduce default production build work without changing runtime behavior.

Scope

  • Gate rollup-plugin-visualizer behind an env flag (e.g. ANALYZE=1 bun run build:frontend).
  • Keep one of gzip or brotli in default build (pick based on how the binary serves assets); remove the other from default pipeline.
  • Add npm script build:frontend:analyze if helpful.

Acceptance criteria

  • Default bun run build:frontend does not write tmp/dist-stats.html.
  • ANALYZE=1 (or dedicated script) still produces bundle stats.
  • Default build runs only one vite-plugin-compression plugin.
  • bun run build succeeds.
  • Built frontend assets are served correctly by smoke start.

Depends on

Nothing.

Verification

bun run build:frontend
test ! -f tmp/dist-stats.html || echo "visualizer should be off by default"
ANALYZE=1 bun run build:frontend
bun src/server/server.ts --port=3001 --data-dir=./data/smoke

Audit reference

Finding #23 — Vite plugin bloat.

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

Visualizer opt-in via ANALYZE=1; default build uses brotli only. No new build dependencies.

Lean already. Ship.

3 files changed, 348 insertions(+), 499 deletions(-)

@Igloczek
Igloczek force-pushed the task/016-optimize-vite-build-plugins branch from 63e6d92 to 7ad0820 Compare June 30, 2026 12:03
Igloczek added 3 commits June 30, 2026 14:16
Gate rollup-plugin-visualizer behind ANALYZE=1, add build:frontend:analyze,
and drop gzip precompression since the server prefers brotli assets.
@Igloczek
Igloczek force-pushed the task/016-optimize-vite-build-plugins branch from 7ad0820 to a579f33 Compare June 30, 2026 12:18
@Igloczek
Igloczek merged commit 4ac713b into master Jun 30, 2026
1 check passed
@Igloczek
Igloczek deleted the task/016-optimize-vite-build-plugins branch June 30, 2026 12:58
Igloczek added a commit that referenced this pull request Aug 8, 2026
…gins

Task 016: Make Vite visualizer opt-in and use one compression algo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant