From: Evan You Date: Thu, 19 Nov 2020 17:33:52 +0000 (-0500) Subject: wip: allow scriptCompiled to be cached on sfc descriptor X-Git-Tag: v3.0.3~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=737ef424a0ca1eb3a856b737e269025fe0ced1d7;p=thirdparty%2Fvuejs%2Fcore.git wip: allow scriptCompiled to be cached on sfc descriptor --- diff --git a/packages/compiler-sfc/src/parse.ts b/packages/compiler-sfc/src/parse.ts index 4ec10b5eb7..3cd0b3aeba 100644 --- a/packages/compiler-sfc/src/parse.ts +++ b/packages/compiler-sfc/src/parse.ts @@ -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 @@ -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)[] @@ -97,6 +98,7 @@ export function parse( template: null, script: null, scriptSetup: null, + scriptCompiled: null, styles: [], customBlocks: [], cssVars: []