mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Major additions based on deep code analysis: **Framework-Agnostic Architecture:** - Document that React is just a built-in example, not the only option - Add complete Svelte framework example showing custom plugins - Show multi-framework apps with different router types - Explain plugin system for custom file transformations **Advanced CSS Hot Module Reloading:** - Document sophisticated CSS HMR with MutationObserver tracking - Framework-aware CSS management during client navigation - CSSStyleSheet API for instant style replacement - CSS chunking, routing-based splitting, and optimization **Static Site Generation with Dynamic Params:** - Document `getParams` export requirement for dynamic routes - Show streaming parameter generation with async iterators - Explain exhaustive vs non-exhaustive parameter generation - Add Next.js `getStaticPaths` compatibility examples **Production Build Features:** - Document that `bun build --app` creates static builds by default - Explain `import.meta.env.STATIC` environment variable - Show complete build output structure with .rsc files - Document RSC payload generation for seamless navigation **Advanced Development Features:** - HMR with file watching and incremental rebuilds - Error overlay with stack traces and source maps - Custom hot reload hooks for framework authors - Environment variables for different build modes **Complete API Reference:** - All Framework configuration options - RouteMetadata interface documentation - Special module imports (bun:bake/server, bun:bake/client) - Custom router function examples Based on actual implementation analysis of: - /workspace/bun/src/bake/production.zig (build system) - /workspace/bun/src/bake/client/css-reloader.ts (CSS HMR) - /workspace/bun/test/bake/fixtures/svelte-component-islands/ (framework examples) - /workspace/bun/src/bake/bun-framework-react/ (React integration) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>