## Summary - **Replace Babel env var transforms with Vite's native `define`** — `process.env.FRESH_PUBLIC_*` and `import.meta.env.FRESH_PUBLIC_*` now use Vite's built-in `define` config. `Deno.env.get()` calls use a lightweight regex-based transform (~10 lines vs 78-line Babel plugin). - **Remove the 960-line CJS→ESM Babel transform** — Instead of transforming CJS to ESM via Babel, let Vite handle CJS packages natively: - **Build mode**: Rollup's `@rollup/plugin-commonjs` handles CJS (always has, but was bypassed by `deno.ts` loading through `@deno/loader`) - **Dev mode**: A ~30-line CJS shim wraps `node_modules` CJS files with `module`/`exports`/`require` so Vite's SSR module runner can evaluate them - `deno.ts` no longer attaches `meta.deno` to file:// resolved paths — Vite loads them from disk directly - **Remove `noDiscovery: true`** — Vite's dependency optimizer can now pre-bundle CJS packages for the client - **Fix React compat aliasing** — Apply `resolve.alias` (react → preact/compat) in `deno.ts` before `@deno/loader` resolution, so the alias works even when packages are non-external in SSR Net: **~2,050 lines deleted**, ~150 lines added. Fixes #3619, fixes #3653, fixes #3505, fixes #3478, fixes #3449.
3 lines
48 B
JavaScript
3 lines
48 B
JavaScript
import assert from "node:assert";
|
|
assert(true);
|