docs: Create comprehensive ESBuild migration plan
Create detailed migration plan for transitioning from window globals to ES modules + Alpine.js architecture. The plan addresses all gaps in the previous setup document and provides incremental migration phases. Changes: - Add ESBUILD_MIGRATION_PLAN.md: Complete 46KB guide with 6 phases - Add ESBUILD_README.md: Quick reference for starting migration - Add ESBUILD_IMPORT_FIXES.md: Summary of import corrections - Archive ESBUILD_SETUP_OLD.md: Preserve previous incomplete plan Key improvements: - ES module exports for TypeScript→TypeScript dependencies - Alpine.js ONLY for template bridge (not internal TS) - Incremental migration with no legacy code - Clear testing and rollback procedures - File-by-file checklists for each phase The plan corrects critical issues: - 193+ internal window reads → proper ES imports - Function wrapping (themeDropdown.ts) → restructured - Dual exports: ES modules + Alpine namespaces - SSR-first with progressive enhancement Total scope: 21 TypeScript files, 27 template files, ~1700 lines of detailed instructions. Related: Issue #ESBuild-Migration
This commit is contained in: