Add Node.js dev runtime with HMR infrastructure
Creates a new Node.js development runtime (dev-runtime.ts) that includes HMR support, mirroring the browser's dev-base.ts functionality: - HotModule interface with module.hot API (accept, decline, dispose, etc.) - createModuleHot() for creating the hot API on modules - disposeModule() for cleaning up modules during HMR - getAffectedModuleEffects() for traversing the module graph - applyEcmascriptMergedUpdate() for applying HMR updates - Exposes globalThis.__turbopack_server_hmr_apply__ for the hot-reloader Updates the Rust side: - nodejs_runtime.rs now takes RuntimeType parameter - Uses dev-runtime.ts for development, runtime.ts for production
Showing
This diff is collapsed.
Please
register
or
sign in
to comment