|
@@ -37,7 +37,10 @@ export function parseCssVars(sfc: SFCDescriptor): string[] {
|
|
|
sfc.styles.forEach(style => {
|
|
sfc.styles.forEach(style => {
|
|
|
let match
|
|
let match
|
|
|
while ((match = cssVarRE.exec(style.content))) {
|
|
while ((match = cssVarRE.exec(style.content))) {
|
|
|
- vars.push(match[1] || match[2] || match[3])
|
|
|
|
|
|
|
+ const variable = match[1] || match[2] || match[3]
|
|
|
|
|
+ if (!vars.includes(variable)) {
|
|
|
|
|
+ vars.push(variable)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
return vars
|
|
return vars
|