|
|
@@ -1,6 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
|
import Header from './Header.vue'
|
|
|
-import { Repl, ReplStore } from '@vue/repl'
|
|
|
+import { Repl, ReplStore, SFCOptions } from '@vue/repl'
|
|
|
import { ref, watchEffect } from 'vue'
|
|
|
|
|
|
const setVH = () => {
|
|
|
@@ -33,7 +33,7 @@ const store = new ReplStore({
|
|
|
})
|
|
|
|
|
|
// enable experimental features
|
|
|
-const sfcOptions = {
|
|
|
+const sfcOptions: SFCOptions = {
|
|
|
script: {
|
|
|
inlineTemplate: !useDevMode.value,
|
|
|
isProd: !useDevMode.value,
|
|
|
@@ -59,10 +59,10 @@ watchEffect(() => {
|
|
|
|
|
|
function toggleDevMode() {
|
|
|
const dev = (useDevMode.value = !useDevMode.value)
|
|
|
- sfcOptions.script.inlineTemplate =
|
|
|
- sfcOptions.script.isProd =
|
|
|
- sfcOptions.template.isProd =
|
|
|
- sfcOptions.style.isProd =
|
|
|
+ sfcOptions.script!.inlineTemplate =
|
|
|
+ sfcOptions.script!.isProd =
|
|
|
+ sfcOptions.template!.isProd =
|
|
|
+ sfcOptions.style!.isProd =
|
|
|
!dev
|
|
|
store.setFiles(store.getFiles())
|
|
|
}
|