feat: support fresh projects that are part of a workspace (#2716)

Also a performance improvement & bug fix in the tailwind plugin.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Luca Casonato
2024-10-17 17:08:24 +02:00
committed by GitHub
co-authored by Marvin Hagemeister
parent bf43a0e90c
commit 407987589f
12 changed files with 249 additions and 874 deletions
+3 -2
View File
@@ -1,6 +1,5 @@
import tailwindCss, { type Config } from "tailwindcss";
import postcss from "postcss";
import cssnano from "cssnano";
import autoprefixer from "autoprefixer";
import * as path from "@std/path";
import type { TailwindPluginOptions } from "./types.ts";
@@ -72,8 +71,10 @@ export async function initTailwind(
];
if (config.mode === "production") {
const { default: cssnano } = await import("cssnano");
plugins.push(cssnano());
}
return postcss(plugins);
const res = postcss(plugins);
return res;
}