From f82bd7e63da0f1eaee03143428ba5f6ae96ffa4f Mon Sep 17 00:00:00 2001 From: fry69 <142489379+fry69@users.noreply.github.com> Date: Sat, 20 Sep 2025 13:17:11 +0200 Subject: [PATCH] docs: add deno.json update section to migration guide (#3471) fix #3470 This adds a short blurb about `deno.json` focusing on imports. Background: Without `npm:vite` and `jsr:@fresh/plugin-vite` installed it can lead to confusing errors like this one: ```shell $ deno task dev vite: command not found ``` Which might lead to users install Vite globally, which is not needed (and will not fix this problem). --- docs/latest/examples/migration-guide.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/latest/examples/migration-guide.md b/docs/latest/examples/migration-guide.md index 4e9cb189..a5c08316 100644 --- a/docs/latest/examples/migration-guide.md +++ b/docs/latest/examples/migration-guide.md @@ -155,6 +155,22 @@ accordingly. } ``` +## Update imports + +Add `jsr:@fresh/plugin-vite` and `npm:vite` to `imports` in your `deno.json` +file, either manually or with this command: + +```shell +deno install npm:vite jsr:@fresh/plugin-vite +``` + +This should be enough in most cases. If you still encounter problems, you may +also need to update `compilerOptions` and other parts. For a complete, +up‑to‑date example, generate a new app (“Migrate by example” below) and compare. + +> Note: With Vite, Fresh’s Tailwind plugin (`jsr:@fresh/plugin-tailwindcss*`) is +> not needed; use the Vite integration instead (e.g. `npm:@tailwindcss/vite`). + ## Update deployment settings Fresh 2 requires assets to be built during deployment instead of building them