wip: template binding optimization
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import MagicString from 'magic-string'
|
||||
import { BindingMetadata } from '@vue/compiler-core'
|
||||
import { SFCDescriptor, SFCScriptBlock } from './parse'
|
||||
import { parse, ParserPlugin } from '@babel/parser'
|
||||
import { babelParserDefautPlugins, generateCodeFrame } from '@vue/shared'
|
||||
@@ -28,10 +29,6 @@ export interface SFCScriptCompileOptions {
|
||||
babelParserPlugins?: ParserPlugin[]
|
||||
}
|
||||
|
||||
export interface BindingMetadata {
|
||||
[key: string]: 'data' | 'props' | 'setup' | 'ctx'
|
||||
}
|
||||
|
||||
let hasWarned = false
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,9 +24,10 @@ export {
|
||||
SFCAsyncStyleCompileOptions,
|
||||
SFCStyleCompileResults
|
||||
} from './compileStyle'
|
||||
export { SFCScriptCompileOptions, BindingMetadata } from './compileScript'
|
||||
export { SFCScriptCompileOptions } from './compileScript'
|
||||
export {
|
||||
CompilerOptions,
|
||||
CompilerError,
|
||||
BindingMetadata,
|
||||
generateCodeFrame
|
||||
} from '@vue/compiler-core'
|
||||
|
||||
@@ -3,17 +3,14 @@ import {
|
||||
ElementNode,
|
||||
SourceLocation,
|
||||
CompilerError,
|
||||
TextModes
|
||||
TextModes,
|
||||
BindingMetadata
|
||||
} from '@vue/compiler-core'
|
||||
import * as CompilerDOM from '@vue/compiler-dom'
|
||||
import { RawSourceMap, SourceMapGenerator } from 'source-map'
|
||||
import { generateCodeFrame } from '@vue/shared'
|
||||
import { TemplateCompiler } from './compileTemplate'
|
||||
import {
|
||||
compileScript,
|
||||
BindingMetadata,
|
||||
SFCScriptCompileOptions
|
||||
} from './compileScript'
|
||||
import { compileScript, SFCScriptCompileOptions } from './compileScript'
|
||||
|
||||
export interface SFCParseOptions extends SFCScriptCompileOptions {
|
||||
filename?: string
|
||||
|
||||
Reference in New Issue
Block a user