mirror of https://github.com/vuejs/core.git
refactor: better naming for baseCompile argument
This commit is contained in:
parent
94c86269d0
commit
e41cf8dc59
|
@ -59,7 +59,7 @@ export function getBaseTransformPreset(
|
|||
// we name it `baseCompile` so that higher order compilers like
|
||||
// @vue/compiler-dom can export `compile` while re-exporting everything else.
|
||||
export function baseCompile(
|
||||
template: string | RootNode,
|
||||
source: string | RootNode,
|
||||
options: CompilerOptions = {}
|
||||
): CodegenResult {
|
||||
const onError = options.onError || defaultOnError
|
||||
|
@ -82,7 +82,7 @@ export function baseCompile(
|
|||
onError(createCompilerError(ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED))
|
||||
}
|
||||
|
||||
const ast = isString(template) ? baseParse(template, options) : template
|
||||
const ast = isString(source) ? baseParse(source, options) : source
|
||||
const [nodeTransforms, directiveTransforms] =
|
||||
getBaseTransformPreset(prefixIdentifiers)
|
||||
|
||||
|
|
Loading…
Reference in New Issue