Skip to content

Commit

Permalink
wip: allow scriptCompiled to be cached on sfc descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 19, 2020
1 parent 6541e70 commit 737ef42
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/compiler-sfc/src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ export interface SFCParseOptions {
compiler?: TemplateCompiler
}

export interface SFCDescriptor {
filename: string
source: string
template: SFCTemplateBlock | null
script: SFCScriptBlock | null
scriptSetup: SFCScriptBlock | null
scriptCompiled: SFCScriptBlock | null
styles: SFCStyleBlock[]
customBlocks: SFCBlock[]
cssVars: string[]
}

export interface SFCBlock {
type: string
content: string
Expand Down Expand Up @@ -49,17 +61,6 @@ export interface SFCStyleBlock extends SFCBlock {
module?: string | boolean
}

export interface SFCDescriptor {
filename: string
source: string
template: SFCTemplateBlock | null
script: SFCScriptBlock | null
scriptSetup: SFCScriptBlock | null
styles: SFCStyleBlock[]
customBlocks: SFCBlock[]
cssVars: string[]
}

export interface SFCParseResult {
descriptor: SFCDescriptor
errors: (CompilerError | SyntaxError)[]
Expand Down Expand Up @@ -97,6 +98,7 @@ export function parse(
template: null,
script: null,
scriptSetup: null,
scriptCompiled: null,
styles: [],
customBlocks: [],
cssVars: []
Expand Down

0 comments on commit 737ef42

Please sign in to comment.