fix(compiler): export COMMENT instead EMPTY runtime helper
This commit is contained in:
parent
a84490858f
commit
9ad7ae479e
@ -3,7 +3,6 @@ export const PORTAL = Symbol(__DEV__ ? `Portal` : ``)
|
|||||||
export const COMMENT = Symbol(__DEV__ ? `Comment` : ``)
|
export const COMMENT = Symbol(__DEV__ ? `Comment` : ``)
|
||||||
export const TEXT = Symbol(__DEV__ ? `Text` : ``)
|
export const TEXT = Symbol(__DEV__ ? `Text` : ``)
|
||||||
export const SUSPENSE = Symbol(__DEV__ ? `Suspense` : ``)
|
export const SUSPENSE = Symbol(__DEV__ ? `Suspense` : ``)
|
||||||
export const EMPTY = Symbol(__DEV__ ? `Empty` : ``)
|
|
||||||
export const OPEN_BLOCK = Symbol(__DEV__ ? `openBlock` : ``)
|
export const OPEN_BLOCK = Symbol(__DEV__ ? `openBlock` : ``)
|
||||||
export const CREATE_BLOCK = Symbol(__DEV__ ? `createBlock` : ``)
|
export const CREATE_BLOCK = Symbol(__DEV__ ? `createBlock` : ``)
|
||||||
export const CREATE_VNODE = Symbol(__DEV__ ? `createVNode` : ``)
|
export const CREATE_VNODE = Symbol(__DEV__ ? `createVNode` : ``)
|
||||||
@ -27,7 +26,7 @@ export const helperNameMap: any = {
|
|||||||
[COMMENT]: `Comment`,
|
[COMMENT]: `Comment`,
|
||||||
[TEXT]: `Text`,
|
[TEXT]: `Text`,
|
||||||
[SUSPENSE]: `Suspense`,
|
[SUSPENSE]: `Suspense`,
|
||||||
[EMPTY]: `Empty`,
|
[COMMENT]: `Comment`,
|
||||||
[OPEN_BLOCK]: `openBlock`,
|
[OPEN_BLOCK]: `openBlock`,
|
||||||
[CREATE_BLOCK]: `createBlock`,
|
[CREATE_BLOCK]: `createBlock`,
|
||||||
[CREATE_VNODE]: `createVNode`,
|
[CREATE_VNODE]: `createVNode`,
|
||||||
|
@ -30,7 +30,7 @@ import { processExpression } from './transformExpression'
|
|||||||
import {
|
import {
|
||||||
OPEN_BLOCK,
|
OPEN_BLOCK,
|
||||||
CREATE_BLOCK,
|
CREATE_BLOCK,
|
||||||
EMPTY,
|
COMMENT,
|
||||||
FRAGMENT,
|
FRAGMENT,
|
||||||
APPLY_DIRECTIVES,
|
APPLY_DIRECTIVES,
|
||||||
CREATE_VNODE
|
CREATE_VNODE
|
||||||
@ -153,7 +153,7 @@ function createCodegenNodeForBranch(
|
|||||||
branch.condition,
|
branch.condition,
|
||||||
createChildrenCodegenNode(branch, index, context),
|
createChildrenCodegenNode(branch, index, context),
|
||||||
createCallExpression(context.helper(CREATE_BLOCK), [
|
createCallExpression(context.helper(CREATE_BLOCK), [
|
||||||
context.helper(EMPTY)
|
context.helper(COMMENT)
|
||||||
])
|
])
|
||||||
) as IfConditionalExpression
|
) as IfConditionalExpression
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,7 +21,7 @@ import { SuspenseBoundary } from './suspense'
|
|||||||
|
|
||||||
export const Fragment = __DEV__ ? Symbol('Fragment') : Symbol()
|
export const Fragment = __DEV__ ? Symbol('Fragment') : Symbol()
|
||||||
export const Text = __DEV__ ? Symbol('Text') : Symbol()
|
export const Text = __DEV__ ? Symbol('Text') : Symbol()
|
||||||
export const Comment = __DEV__ ? Symbol('Empty') : Symbol()
|
export const Comment = __DEV__ ? Symbol('Comment') : Symbol()
|
||||||
export const Portal = __DEV__ ? Symbol('Portal') : Symbol()
|
export const Portal = __DEV__ ? Symbol('Portal') : Symbol()
|
||||||
export const Suspense = __DEV__ ? Symbol('Suspense') : Symbol()
|
export const Suspense = __DEV__ ? Symbol('Suspense') : Symbol()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user