Reverts tailwind v4 update. Something is wrong with the CSS files on
fresh.deno.dev 😢
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user