File tree 2 files changed +5
-4
lines changed
packages/compiler-sfc/src
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
import hash from 'hash-sum'
11
11
import LRU from 'lru-cache'
12
12
import { hmrShouldReload } from './compileScript'
13
+ import { parseCssVars } from './cssVars'
13
14
14
15
const cache = new LRU < string , SFCDescriptor > ( 100 )
15
16
@@ -57,6 +58,10 @@ export function parse(options: SFCParseOptions): SFCDescriptor {
57
58
}
58
59
59
60
output . filename = filename
61
+
62
+ // parse CSS vars
63
+ output . cssVars = parseCssVars ( output )
64
+
60
65
output . shouldForceReload = prevImports =>
61
66
hmrShouldReload ( prevImports , output ! )
62
67
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { makeMap } from 'shared/util'
4
4
import { ASTAttr , WarningMessage } from 'types/compiler'
5
5
import { BindingMetadata , RawSourceMap } from './types'
6
6
import type { ImportBinding } from './compileScript'
7
- import { parseCssVars } from './cssVars'
8
7
9
8
export const DEFAULT_FILENAME = 'anonymous.vue'
10
9
@@ -209,8 +208,5 @@ export function parseComponent(
209
208
outputSourceRange : options . outputSourceRange
210
209
} )
211
210
212
- // parse CSS vars
213
- sfc . cssVars = parseCssVars ( sfc )
214
-
215
211
return sfc
216
212
}
You can’t perform that action at this time.
0 commit comments