Skip to content

Commit bc37364

Browse files
committed
presetUno -> presetWind3, 加 extractors 让 vscode 能配对
1 parent 896a867 commit bc37364

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

uno.config.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
import { defineConfig, presetUno } from "unocss";
1+
import { defineConfig, presetWind3 } from "unocss";
22

33
export default defineConfig({
4+
extractors: [
5+
{
6+
name: "prefix-tw",
7+
extract({ code }) {
8+
return Array.from(code.matchAll(/tw-[\w-:/]+/g)).map((i) => i[0]);
9+
},
10+
},
11+
],
412
content: {
513
filesystem: ["./src/**/*.{html,js,ts,jsx,tsx}"],
614
},
7-
presets: [presetUno({ dark: "class", prefix: "tw-" })],
15+
presets: [
16+
presetWind3({
17+
dark: "class",
18+
prefix: "tw-",
19+
}),
20+
],
821
});

0 commit comments

Comments
 (0)