workflow(sfc-playground): set all scopes to production mode (#6815)

This commit is contained in:
三咲智子 Kevin Deng 2022-11-08 14:10:56 +08:00 committed by GitHub
parent e4de623ea7
commit e049772247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -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())
}