Skip to content

Commit e486254

Browse files
committed
fix(compiler-core): preserve comment content in production when comments option is enabled
1 parent 1d1af40 commit e486254

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/compiler-core/src/codegen.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -738,13 +738,11 @@ function genExpressionAsPropertyKey(
738738
}
739739

740740
function genComment(node: CommentNode, context: CodegenContext) {
741-
if (__DEV__) {
742-
const { push, helper, pure } = context
743-
if (pure) {
744-
push(PURE_ANNOTATION)
745-
}
746-
push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node)
741+
const { push, helper, pure } = context
742+
if (pure) {
743+
push(PURE_ANNOTATION)
747744
}
745+
push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node)
748746
}
749747

750748
function genVNodeCall(node: VNodeCall, context: CodegenContext) {

0 commit comments

Comments
 (0)