]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow: log options in template-explorer
authorEvan You <yyx990803@gmail.com>
Fri, 20 Nov 2020 22:16:28 +0000 (17:16 -0500)
committerEvan You <yyx990803@gmail.com>
Fri, 20 Nov 2020 22:16:28 +0000 (17:16 -0500)
packages/template-explorer/src/index.ts
packages/template-explorer/src/options.ts

index 2eed6e0603a200076c519ace6f726b3e251d9a5f..e1328913ab821bc170a0d30166a758466391a003 100644 (file)
@@ -2,7 +2,7 @@ import * as m from 'monaco-editor'
 import { compile, CompilerError, CompilerOptions } from '@vue/compiler-dom'
 import { compile as ssrCompile } from '@vue/compiler-ssr'
 import { compilerOptions, initOptions, ssrMode } from './options'
-import { watchEffect } from '@vue/runtime-dom'
+import { toRaw, watchEffect } from '@vue/runtime-dom'
 import { SourceMapConsumer } from 'source-map'
 import theme from './theme'
 
@@ -67,6 +67,7 @@ window.init = () => {
         errors.filter(e => e.loc).map(formatError)
       )
       console.log(`AST: `, ast)
+      console.log(`Options: `, toRaw(compilerOptions))
       lastSuccessfulCode = code + `\n\n// Check the console for the AST`
       lastSuccessfulMap = new SourceMapConsumer(map!)
       lastSuccessfulMap!.computeColumnSpans()
index d903a017a621e8a0e911c3c866c5c73333a8b3f7..cdf00ec874a18fd64011025a8d82bad24ca89a05 100644 (file)
@@ -16,6 +16,7 @@ export const compilerOptions: CompilerOptions = reactive({
   bindingMetadata: {
     TestComponent: BindingTypes.SETUP_CONST,
     setupRef: BindingTypes.SETUP_REF,
+    setupConst: BindingTypes.SETUP_CONST,
     setupLet: BindingTypes.SETUP_LET,
     setupMaybeRef: BindingTypes.SETUP_MAYBE_REF,
     setupProp: BindingTypes.PROPS