This commit is contained in:
Alex
2024-04-07 21:18:45 -04:00
parent 4114914eea
commit bec8b92669
5 changed files with 31 additions and 15 deletions

View File

@ -1,6 +1,7 @@
import hash from "@emotion/hash";
import type { Config } from "tailwindcss";
import type postcss from "postcss";
import { memoize } from "lodash";
import { babelTailwind } from "./babel-tailwind";
import { esbuildPlugin } from "./esbuild-postcss";
import { vitePlugin } from "./vite-plugin";
@ -90,7 +91,7 @@ export const getClassName: GetClassName = cls => "tw-" + hash(cls);
*/
export function getTailwindPlugins(options: TailwindPluginOptions) {
const styleMap: StyleMap = new Map();
const compile = createPostCSS(options);
const compile = memoize(createPostCSS(options));
return {
compile,