Second attempt after we had to revert https://github.com/denoland/fresh/pull/3185
EXPERIMENTAL: vite plugin for Fresh
Warning
This package is experimental. Please report bugs to https://github.com/denoland/fresh/issues
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