Skip to content

Commit 92cacc7

Browse files
committed
fix: prop use resolution
1 parent 6101216 commit 92cacc7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pathscale/rollup-plugin-vue3-ui-css-purge",
3-
"version": "0.0.39",
3+
"version": "0.0.40",
44
"description": "Automatically remove unused CSS when using vue3-ui",
55
"keywords": [
66
"rollup",

src/analyzer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ export function analyze(
9595
}
9696
},
9797

98-
onattribute(prop, data) {
98+
onattribute(p, data) {
9999
for (const cl of data.split(" ")) whitelist.add(cl);
100100

101+
const prop = p.replace(":", "") // remove : from props like :loading -> loading
102+
103+
101104
if (kebabCase(currentTag).startsWith("v-")) {
102105
// optional
103106
if (mappings[currentTag]?.optional.includes(`is-${prop}`)) {

0 commit comments

Comments
 (0)