Revert "feat: update the tailwind plugin to suuport tailwindv4 #2819 (#2903)" (#2988)

Reverts tailwind v4 update. Something is wrong with the CSS files on
fresh.deno.dev 😢
This commit is contained in:
Marvin Hagemeister
2025-05-21 16:07:51 +02:00
committed by GitHub
parent 40e7747228
commit dbb76623a4
13 changed files with 1041 additions and 413 deletions
+3 -3
View File
@@ -1,19 +1,19 @@
import type { TailwindPluginOptions } from "./types.ts";
import { initTailwind } from "./compiler.ts";
import type { FreshBuilder } from "fresh/dev";
import type { App } from "fresh";
import type { TailwindPluginOptions } from "./types.ts";
export function tailwind<T>(
builder: FreshBuilder,
app: App<T>,
options: TailwindPluginOptions = {},
): void {
let processor: ReturnType<typeof initTailwind> | null = null;
let processor: ReturnType<typeof initTailwind> | null;
builder.onTransformStaticFile(
{ pluginName: "tailwind", filter: /\.css$/, exclude: options.exclude },
async (args) => {
if (!processor) processor = initTailwind(app.config);
if (!processor) processor = initTailwind(app.config, options);
const instance = await processor;
const res = await instance.process(args.text, {
from: args.path,