From 9f2ba0dbe3d0d49cb1bd16c51efb20a02a537b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Tue, 4 Oct 2022 02:21:52 +0800 Subject: [PATCH] fix(sfc-playground): set all scopes to production mode --- packages/sfc-playground/src/App.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/sfc-playground/src/App.vue b/packages/sfc-playground/src/App.vue index 33ed68c1043..ef6481cb98b 100644 --- a/packages/sfc-playground/src/App.vue +++ b/packages/sfc-playground/src/App.vue @@ -36,7 +36,14 @@ const store = new ReplStore({ const sfcOptions = { script: { inlineTemplate: !useDevMode.value, + isProd: !useDevMode.value, reactivityTransform: true + }, + style: { + isProd: !useDevMode.value + }, + template: { + isProd: !useDevMode.value } } @@ -51,7 +58,11 @@ watchEffect(() => { function toggleDevMode() { const dev = (useDevMode.value = !useDevMode.value) - sfcOptions.script.inlineTemplate = !dev + sfcOptions.script.inlineTemplate = + sfcOptions.script.isProd = + sfcOptions.template.isProd = + sfcOptions.style.isProd = + !dev store.setFiles(store.getFiles()) }