We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6446a6 commit 381b497Copy full SHA for 381b497
packages/compiler-sfc/src/style/cssVars.ts
@@ -53,8 +53,9 @@ export function parseCssVars(sfc: SFCDescriptor): string[] {
53
const vars: string[] = []
54
sfc.styles.forEach(style => {
55
let match
56
- // ignore v-bind() in comments /* ... */
57
- const content = style.content.replace(/\/\*([\s\S]*?)\*\//g, '')
+ // ignore v-bind() in comments, eg /* ... */
+ // and // (Less, Sass and Stylus all support the use of // to comment)
58
+ const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, '')
59
while ((match = vBindRE.exec(content))) {
60
const start = match.index + match[0].length
61
const end = lexBinding(content, start)
0 commit comments