fix(compiler-core): preserve comment content in production when comments option is enabled
This commit is contained in:
parent
1d1af403ca
commit
e486254431
@ -738,13 +738,11 @@ 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user