feat: modernize preact demo to latest versions
Modernizes the preact demo with latest versions and build tools
Closes #476
Generated with Claude Code
Does preact still use babel and not vite?
@claude please verify this is a modern 2025 setup for preact. Checkout the preact repo and examples please
💬 Claude Code execution complete
📊 Execution Info: Pull Request #496 | Unknown (402 files) | @DavidWells
🌿 Branch: claude/issue-476-20250620_205609 → master
🚀 Automated management executed:
💡 Example commands for Claude:
🔍 Analysis & Review:
claude Please review the codeclaude Please perform a security checkclaude Please suggest performance improvements
🛠️ Tasks & Implementation:
claude Please add test casesclaude Please fix this issue and create a PRclaude Please suggest refactoring
📚 Management & Operations:
claude Please create a releaseclaude Please check security alertsclaude Please optimize the workflow
🔀 PR Specific:
claude Please perform a final check before mergingclaude Please check for breaking changes
🔄 Rerun: You can run again anytime with claude [your instructions]
Claude finished @DavidWells's task —— View job
Analyzing Preact Demo Setup ✅
Verified the modernized Preact demo setup and compared against 2025 best practices.
Todo List:
- [x] Read current preact demo files to understand the setup
- [x] Check for repo-specific guidelines (CLAUDE.md)
- [x] Analyze package.json dependencies and build tools
- [x] Research current Preact best practices for 2025
- [x] Compare current setup against modern standards
- [x] Provide recommendations and feedback
📋 Analysis Results
What This PR Modernizes:
- ✅ Preact: v8.2.6 → v10.26.9 (latest)
- ✅ preact-cli: v2.1.0 → v3.5.1 (latest)
- ✅ ESLint: v4.9.0 → v9.16.0 (latest)
- ✅ Jest: v21.2.1 → v29.7.0 (latest)
- ✅ Removed deprecated
preact-compatandeslint-config-synacor - ✅ Added proper Jest + JSX testing configuration via Babel
🔧 Build Tool Analysis: preact-cli vs Vite
Current Setup (preact-cli):
- ✅ Official Preact team tool, actively maintained
- ✅ Zero-config setup optimized for Preact apps
- ✅ Built-in code splitting, PWA features, and optimizations
- ✅ Simple commands:
preact build,preact watch,preact serve
Alternative (Vite):
- ⚡ Faster development server and builds
- 🔧 More manual configuration required
- 📦 Smaller ecosystem of Preact-specific plugins
- 🆕 More modern but requires migration effort
✅ Recommendation: Current Setup is Modern for 2025
Why this setup is appropriate:
- Latest Versions: All dependencies are current (Dec 2024/Jan 2025)
- Official Tooling: preact-cli v3.5.1 is actively maintained and modern
- Babel Purpose: The
babel.config.jsis only for Jest testing, not build process - Build Process: preact-cli handles modern bundling internally (Webpack 5, modern JS, tree-shaking)
For this analytics library demo specifically:
- ✅ preact-cli provides the right balance of simplicity and modern features
- ✅ Easy for contributors to understand and run
- ✅ No unnecessary complexity for a demo/example project
🚀 Optional Future Enhancement
If you wanted to modernize further to Vite (not necessary, but possible):
- Would need
vite.config.jswith@preact/preset-vite - Faster dev server and builds
- Manual setup of testing, PWA features, etc.
Verdict: This PR successfully modernizes the Preact demo to 2025 standards. The use of preact-cli over Vite is appropriate and the Babel configuration serves its intended purpose for testing.