Start renaming

This commit is contained in:
2026-11-11 11:45:20 -03:00
parent ae22ec5276
commit 216d54a0ae
179 changed files with 890 additions and 449 deletions
+13 -13
View File
@@ -14,7 +14,7 @@ The Fresh Vite plugin can be configured in `vite.config.ts`:
```ts vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
export default defineConfig({
plugins: [
@@ -49,7 +49,7 @@ generally come first:
```ts vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
@@ -109,10 +109,10 @@ types so HMR and asset imports type-check:
"start": "deno serve -A _fresh/server.js"
},
"imports": {
"fresh": "jsr:@fresh/core@^2",
"sweet": "jsr:@paulaboks/sweet@^2",
"preact": "npm:preact@^10",
"@preact/signals": "npm:@preact/signals@^2",
+ "@fresh/plugin-vite": "jsr:@fresh/plugin-vite@^1",
+ "@paulaboks/sweet-vite": "jsr:@paulaboks/sweet-vite@^1",
+ "vite": "npm:vite@^7",
+ "@types/babel__core": "npm:@types/babel__core@^7"
},
@@ -124,7 +124,7 @@ types so HMR and asset imports type-check:
}
```
If you were using `@fresh/plugin-tailwind` / `@fresh/plugin-tailwindcss-v3`,
If you were using `@paulaboks/sweet-tailwind` / `@fresh/plugin-tailwindcss-v3`,
remove those imports — Vite has a first-party Tailwind plugin (see step 4).
### 2. Replace `dev.ts` with `vite.config.ts`
@@ -133,7 +133,7 @@ Delete `dev.ts` and create a `vite.config.ts` at the project root:
```ts vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
export default defineConfig({
plugins: [fresh()],
@@ -188,7 +188,7 @@ Replace the Builder-side Tailwind plugin with the official Vite plugin:
```diff deno.json
"imports": {
- "@fresh/plugin-tailwind": "jsr:@fresh/plugin-tailwind@^1",
- "@paulaboks/sweet-tailwind": "jsr:@paulaboks/sweet-tailwind@^1",
- "@tailwindcss/postcss": "npm:@tailwindcss/postcss@^4",
- "postcss": "npm:postcss@^8",
+ "@tailwindcss/vite": "npm:@tailwindcss/vite@^4",
@@ -198,7 +198,7 @@ Replace the Builder-side Tailwind plugin with the official Vite plugin:
```ts vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
@@ -229,13 +229,13 @@ change.
- [ ] `client.ts` created and imports your CSS
- [ ] Stylesheet moved out of `static/` and the `<link>` removed from `_app.tsx`
- [ ] `deno.json` tasks point at `vite` / `vite build`
- [ ] `@fresh/plugin-vite`, `vite`, and `@types/babel__core` in `imports`
- [ ] `@paulaboks/sweet-vite`, `vite`, and `@types/babel__core` in `imports`
- [ ] `"vite/client"` in `compilerOptions.types`
- [ ] Tailwind (if used) switched to `@tailwindcss/vite`
> [info]: If you get stuck, run `deno run -Ar jsr:@fresh/init` in a scratch
> directory and diff the generated project against yours — the generator is the
> source of truth for a working Vite-based Fresh setup.
> [info]: If you get stuck, run `deno run -Ar jsr:@paulaboks/sweet-init` in a
> scratch directory and diff the generated project against yours — the generator
> is the source of truth for a working Vite-based Fresh setup.
## Debugging
@@ -250,7 +250,7 @@ To inspect plugin transformations, use
```ts vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
import inspect from "vite-plugin-inspect";
export default defineConfig({