From 2cbed216e8726bebc821e7c49eabd473ff3c7c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6=E8=BF=9C=E6=96=B9?= Date: Mon, 13 Nov 2023 20:27:50 +0800 Subject: [PATCH] fix(sfc-playground): remove comment nodes in the production env --- packages/sfc-playground/src/App.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/sfc-playground/src/App.vue b/packages/sfc-playground/src/App.vue index 744cfd4d9c0..2cc97310f00 100644 --- a/packages/sfc-playground/src/App.vue +++ b/packages/sfc-playground/src/App.vue @@ -45,7 +45,10 @@ const sfcOptions: SFCOptions = { isProd: !useDevMode.value }, template: { - isProd: !useDevMode.value + isProd: !useDevMode.value, + compilerOptions: { + comments: useDevMode.value + } } } @@ -65,6 +68,8 @@ function toggleDevMode() { sfcOptions.template!.isProd = sfcOptions.style!.isProd = !dev + + sfcOptions.template.compilerOptions.comments = dev store.setFiles(store.getFiles()) }