fix(compiler-core): preserve comment content in production when comments option is enabled
This commit is contained in:
parent
1d1af403ca
commit
e486254431
@ -738,14 +738,12 @@ function genExpressionAsPropertyKey(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function genComment(node: CommentNode, context: CodegenContext) {
|
function genComment(node: CommentNode, context: CodegenContext) {
|
||||||
if (__DEV__) {
|
|
||||||
const { push, helper, pure } = context
|
const { push, helper, pure } = context
|
||||||
if (pure) {
|
if (pure) {
|
||||||
push(PURE_ANNOTATION)
|
push(PURE_ANNOTATION)
|
||||||
}
|
}
|
||||||
push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node)
|
push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function genVNodeCall(node: VNodeCall, context: CodegenContext) {
|
function genVNodeCall(node: VNodeCall, context: CodegenContext) {
|
||||||
const { push, helper, pure } = context
|
const { push, helper, pure } = context
|
||||||
|
Loading…
Reference in New Issue
Block a user