File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
packages/compiler-sfc/src Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010import hash from 'hash-sum'
1111import LRU from 'lru-cache'
1212import { hmrShouldReload } from './compileScript'
13+ import { parseCssVars } from './cssVars'
1314
1415const cache = new LRU < string , SFCDescriptor > ( 100 )
1516
@@ -57,6 +58,10 @@ export function parse(options: SFCParseOptions): SFCDescriptor {
5758 }
5859
5960 output . filename = filename
61+
62+ // parse CSS vars
63+ output . cssVars = parseCssVars ( output )
64+
6065 output . shouldForceReload = prevImports =>
6166 hmrShouldReload ( prevImports , output ! )
6267
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { makeMap } from 'shared/util'
44import { ASTAttr , WarningMessage } from 'types/compiler'
55import { BindingMetadata , RawSourceMap } from './types'
66import type { ImportBinding } from './compileScript'
7- import { parseCssVars } from './cssVars'
87
98export const DEFAULT_FILENAME = 'anonymous.vue'
109
@@ -209,8 +208,5 @@ export function parseComponent(
209208 outputSourceRange : options . outputSourceRange
210209 } )
211210
212- // parse CSS vars
213- sfc . cssVars = parseCssVars ( sfc )
214-
215211 return sfc
216212}
You can’t perform that action at this time.
0 commit comments