Skip to content

Switch to esbuild-based application builder - #610

Merged
dcaslin merged 2 commits into
masterfrom
dcaslin/esbuild-builder
Apr 6, 2026
Merged

Switch to esbuild-based application builder#610
dcaslin merged 2 commits into
masterfrom
dcaslin/esbuild-builder

Conversation

@dcaslin

@dcaslin dcaslin commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Switch from webpack browser builder to esbuild application builder (@angular-devkit/build-angular:application)
  • Convert require('../../package.json') to ESM import in environment files (strict typing caught a stale bootstrap dependency reference)
  • Delete polyfills.ts — zone.js now specified directly in angular.json polyfills array
  • Remove webpack-only build options: vendorChunk, buildOptimizer, namedChunks, aot
  • Update deploy workflows (deploy.yml, beta-deploy.yml) for new dist/browser/ output path
  • Update tsconfig: module: "ES2022", moduleResolution: "bundler", resolveJsonModule: true
  • Version bumped to 29.3.0

Verification

  • ng build — clean (7.66 MB dev, 21s) ✅
  • ng build --configuration production — 2.98 MB initial bundle (29s) ✅
  • npm run lint — 0 errors ✅
  • One expected warning: lz-string is CJS (pre-existing, harmless)

Test plan

  • CI build passes
  • Smoke test: home, player, gear, settings
  • Verify service worker works in production build
  • Verify deploy workflow rsync path is correct (dist/browser/)

🤖 Generated with Claude Code

dcaslin and others added 2 commits April 5, 2026 11:46
Replace webpack browser builder with esbuild application builder for
faster builds and better tree-shaking. Convert environment files from
require() to ESM import, delete polyfills.ts (zone.js now in
angular.json), remove webpack-only build options, update deploy
workflows for new dist/browser/ output path, and update tsconfig for
ES2022 modules with bundler resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The application builder's proxy config loader requires jsonc-parser,
which isn't included as a transitive dependency in @angular-devkit/
build-angular 18.x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcaslin
dcaslin merged commit 6b4912e into master Apr 6, 2026
1 check passed
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