Files
sweet/packages/plugin-vite
421e3394a2 fix(vite): use manifest entry filename for server entry import (#3595)
## Summary
When `rollupOptions.output.entryFileNames` is customized in vite config
(e.g. `[hash].mjs`), the generated `server.js` was hardcoding
`server-entry.mjs` as the import path, causing the server to fail to
start.

This fix reads the actual entry filename from the Vite manifest and uses
it in the generated `server.js` import, falling back to
`server-entry.mjs` when no custom naming is configured.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:47:02 +00:00
..

Fresh vite plugin

Vite plugin for Fresh.

Usage

  1. Run deno install jsr:@fresh/plugin-vite npm:vite
  2. Ensure that your deno.json has the fresh import mapping:
{
  "imports": {
    "fresh": "jsr:@fresh/core"
  }
}
  1. Update your vite.config.ts file:
  import { defineConfig } from "vite";
+ import { fresh } from "@fresh/plugin-vite";
  
  export default defineConfig({
    plugins: [
+     fresh(),
    ],
  });
  1. Update your deno tasks respectively:
  • Dev: vite
  • Build: vite build

More information on the Fresh documentation .