## Summary - `staticDir` now accepts `string | string[]` in both the **Vite plugin** (`FreshViteConfig`) and the **Builder API** (`BuildOptions`) - When multiple directories are specified, they are searched in order and the first match wins - **Vite plugin**: first dir maps to Vite's native `publicDir`; extra dirs are served manually in the dev server and walked during production builds - **Builder API**: both `MemoryBuildCache` (dev) and `DiskBuildCache` (prod) iterate over all directories - Updated tailwind v3 plugin to use `config.root` instead of `path.dirname(config.staticDir)` - Docs updated: `static-files.md`, `vite.md`, `builder.md` Closes #3105 --------- 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 .