You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove CJS→ESM Babel transform, let Vite handle CJS natively
Instead of transforming CJS to ESM via a 960-line Babel plugin, let
Vite handle CJS packages natively by:
1. Removing `meta.deno` from file:// resolved paths in deno.ts so
Vite loads npm packages from disk instead of through @deno/loader
2. Removing `noExternal: true` so Vite externalizes npm packages in
SSR dev mode (Node.js handles CJS natively via require())
3. Removing `noDiscovery: true` so Vite's dependency optimizer can
pre-bundle CJS packages for the client
4. Applying resolve.alias before Deno resolution so react -> preact/compat
works even when packages are externalized
Also converts local .cjs test fixtures to ESM since they no longer
go through the CJS transform.
Deletes ~1,800 lines. Eliminates the #1 source of npm compat bugs
(#3619, #3653, #3505, #3478, #3449).
Known regressions (2 tests): radix-ui and remote island need
investigation for duplicate preact instances with externalization.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments