## Summary Three targeted fixes to Fresh's Vite plugin for better module resolution, plus new test coverage. ### 1. Workspace import map resolution Pass the importer's file URL to `loader.resolve()` so bare specifiers from workspace member packages resolve through the correct import map — not just the root `deno.json`. Fixes #3654 ### 2. Remote island resolution Use `this.resolve(spec)` in the `fresh-island::` and `fresh-client-island::` resolveId handlers (`server_snapshot.ts` / `client_snapshot.ts`) so JSR remote islands get proper `\0deno::` specifiers. Without this, remote islands resolved to bare specifiers that Vite couldn't load. Fixes #3437 ### 3. Babel JSX operator precedence fix `!ssr && id.endsWith(".tsx") || id.endsWith(".jsx")` → `!ssr && (id.endsWith(".tsx") || id.endsWith(".jsx"))`. The missing parentheses caused `.jsx` files to incorrectly get Preact JSX transforms during SSR. ### Other changes - Bump `@deno/loader` from ^0.3.10 to ^0.4.0 (needed for workspace resolution fix) - Bump `@astral/astral` from ^0.5.5 to ^0.5.6 (fixes `@std/async@1.2.0` compat) - Add dev server tests for CJS module import and maxmind CJS (#3653) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fresh vite plugin
Vite plugin for Fresh.
Usage
- Run
deno install jsr:@fresh/plugin-vite npm:vite - Ensure that your
deno.jsonhas thefreshimport mapping:
{
"imports": {
"fresh": "jsr:@fresh/core"
}
}
- Update your
vite.config.tsfile:
import { defineConfig } from "vite";
+ import { fresh } from "@fresh/plugin-vite";
export default defineConfig({
plugins: [
+ fresh(),
],
});
- Update your deno tasks respectively:
- Dev:
vite - Build:
vite build
More information on the Fresh documentation .