Skip to content

Commit b61d965

Browse files
committed
chore: shorten option name
1 parent caccf92 commit b61d965

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/compiler-core/src/transform.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { isString, isArray } from '@vue/shared'
1616
import { CompilerError, defaultOnError } from './errors'
1717
import { TO_STRING, COMMENT, CREATE_VNODE, FRAGMENT } from './runtimeConstants'
1818
import { isVSlot, createBlockExpression, isSlotOutlet } from './utils'
19-
import { hoistStaticTrees } from './transforms/hoistStatic'
19+
import { hoistStatic } from './transforms/hoistStatic'
2020

2121
// There are two types of transforms:
2222
//
@@ -51,7 +51,7 @@ export interface TransformOptions {
5151
nodeTransforms?: NodeTransform[]
5252
directiveTransforms?: { [name: string]: DirectiveTransform }
5353
prefixIdentifiers?: boolean
54-
hoistStaticTrees?: boolean
54+
hoistStatic?: boolean
5555
onError?: (error: CompilerError) => void
5656
}
5757

@@ -83,7 +83,7 @@ function createTransformContext(
8383
root: RootNode,
8484
{
8585
prefixIdentifiers = false,
86-
hoistStaticTrees = false,
86+
hoistStatic = false,
8787
nodeTransforms = [],
8888
directiveTransforms = {},
8989
onError = defaultOnError
@@ -102,7 +102,7 @@ function createTransformContext(
102102
vOnce: 0
103103
},
104104
prefixIdentifiers,
105-
hoistStaticTrees,
105+
hoistStatic,
106106
nodeTransforms,
107107
directiveTransforms,
108108
onError,
@@ -204,8 +204,8 @@ function createTransformContext(
204204
export function transform(root: RootNode, options: TransformOptions) {
205205
const context = createTransformContext(root, options)
206206
traverseNode(root, context)
207-
if (options.hoistStaticTrees) {
208-
hoistStaticTrees(root, context)
207+
if (options.hoistStatic) {
208+
hoistStatic(root, context)
209209
}
210210
finalizeRoot(root, context)
211211
}

packages/compiler-core/src/transforms/hoistStatic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TransformContext } from '../transform'
99
import { CREATE_VNODE } from '../runtimeConstants'
1010
import { PropsExpression } from './transformElement'
1111

12-
export function hoistStaticTrees(root: RootNode, context: TransformContext) {
12+
export function hoistStatic(root: RootNode, context: TransformContext) {
1313
walk(root.children, context, new Set<TemplateChildNode>())
1414
}
1515

packages/vue/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function compileToFunction(
88
options?: CompilerOptions
99
): RenderFunction {
1010
const { code } = compile(template, {
11-
hoistStaticTrees: true,
11+
hoistStatic: true,
1212
...options
1313
})
1414
return new Function(code)() as RenderFunction

0 commit comments

Comments
 (0)