Skip to content

Commit 737ef42

Browse files
committed
wip: allow scriptCompiled to be cached on sfc descriptor
1 parent 6541e70 commit 737ef42

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

packages/compiler-sfc/src/parse.ts

+13-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ export interface SFCParseOptions {
2020
compiler?: TemplateCompiler
2121
}
2222

23+
export interface SFCDescriptor {
24+
filename: string
25+
source: string
26+
template: SFCTemplateBlock | null
27+
script: SFCScriptBlock | null
28+
scriptSetup: SFCScriptBlock | null
29+
scriptCompiled: SFCScriptBlock | null
30+
styles: SFCStyleBlock[]
31+
customBlocks: SFCBlock[]
32+
cssVars: string[]
33+
}
34+
2335
export interface SFCBlock {
2436
type: string
2537
content: string
@@ -49,17 +61,6 @@ export interface SFCStyleBlock extends SFCBlock {
4961
module?: string | boolean
5062
}
5163

52-
export interface SFCDescriptor {
53-
filename: string
54-
source: string
55-
template: SFCTemplateBlock | null
56-
script: SFCScriptBlock | null
57-
scriptSetup: SFCScriptBlock | null
58-
styles: SFCStyleBlock[]
59-
customBlocks: SFCBlock[]
60-
cssVars: string[]
61-
}
62-
6364
export interface SFCParseResult {
6465
descriptor: SFCDescriptor
6566
errors: (CompilerError | SyntaxError)[]
@@ -97,6 +98,7 @@ export function parse(
9798
template: null,
9899
script: null,
99100
scriptSetup: null,
101+
scriptCompiled: null,
100102
styles: [],
101103
customBlocks: [],
102104
cssVars: []

0 commit comments

Comments
 (0)