#3818·fresh

tailwind not loaded on new project

Author: towcCreated May 26, 2026Updated Aug 6, 2026
ImageImage

performed steps as per https://fresh.deno.dev/docs/getting-started

bash
 ~ $ deno --version
deno 2.7.14 (stable, release, x86_64-unknown-linux-gnu)
v8 14.7.173.20-rusty
typescript 5.9.2

generated vite config does contain tailwind:

typescript
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [fresh(), tailwindcss()],
});

and assets/styles.css does contain the import:

css
@import "tailwindcss";
.fresh-gradient {
  background-color: rgb(134, 239, 172);
  background-image: linear-gradient(
    to right bottom,
    rgb(219, 234, 254),
    rgb(187, 247, 208),
    rgb(254, 249, 195)
  );
}

deno.json imports seem ok:

json
  "imports": {
    "@/": "./",
    "fresh": "jsr:@fresh/core@^2.3.3",
    "preact": "npm:preact@^10.29.1",
    "@preact/signals": "npm:@preact/signals@^2.9.0",
    "@fresh/plugin-vite": "jsr:@fresh/plugin-vite@^1.1.2",
    "vite": "npm:vite@^7.1.3",
    "@types/babel__core": "npm:@types/babel__core@^7.20.5",
    "tailwindcss": "npm:tailwindcss@^4.1.10",
    "@tailwindcss/vite": "npm:@tailwindcss/vite@^4.1.12"
  },