We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3336797 commit 4c8c7c8Copy full SHA for 4c8c7c8
examples/react-server/src/features/unocss/plugin.ts
@@ -93,8 +93,12 @@ export function vitePluginSharedUnocss(): PluginOption {
93
await ctx.flushTasks();
94
let { css } = await ctx.uno.generate(ctx.tokens);
95
for (const plugin of cssPlugins) {
96
- tinyassert(typeof plugin.transform === "function");
97
- const result = await plugin.transform.apply(this as any, [
+ const handler =
+ "handler" in plugin.transform
98
+ ? plugin.transform.handler
99
+ : plugin.transform;
100
+ tinyassert(typeof handler === "function");
101
+ const result = await handler.apply(this as any, [
102
css,
103
"\0virtual:unocss.css",
104
]);
0 commit comments