wip: allow scriptCompiled to be cached on sfc descriptor
This commit is contained in:
parent
6541e70acb
commit
737ef424a0
@ -20,6 +20,18 @@ export interface SFCParseOptions {
|
|||||||
compiler?: TemplateCompiler
|
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 {
|
export interface SFCBlock {
|
||||||
type: string
|
type: string
|
||||||
content: string
|
content: string
|
||||||
@ -49,17 +61,6 @@ export interface SFCStyleBlock extends SFCBlock {
|
|||||||
module?: string | boolean
|
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 {
|
export interface SFCParseResult {
|
||||||
descriptor: SFCDescriptor
|
descriptor: SFCDescriptor
|
||||||
errors: (CompilerError | SyntaxError)[]
|
errors: (CompilerError | SyntaxError)[]
|
||||||
@ -97,6 +98,7 @@ export function parse(
|
|||||||
template: null,
|
template: null,
|
||||||
script: null,
|
script: null,
|
||||||
scriptSetup: null,
|
scriptSetup: null,
|
||||||
|
scriptCompiled: null,
|
||||||
styles: [],
|
styles: [],
|
||||||
customBlocks: [],
|
customBlocks: [],
|
||||||
cssVars: []
|
cssVars: []
|
||||||
|
Loading…
Reference in New Issue
Block a user