]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow(sfc-playground): display analyzed bindings in js output
authorEvan You <yyx990803@gmail.com>
Mon, 29 Mar 2021 19:26:54 +0000 (15:26 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 29 Mar 2021 20:11:38 +0000 (16:11 -0400)
packages/sfc-playground/src/store.ts

index 5a0a5d0502732bd1349b661d5aac9a5620dd8f2e..7e5cdcb1bf737649e1cdd69efc7d9d606ac72088 100644 (file)
@@ -147,6 +147,13 @@ async function compileFile({ filename, code, compiled }: File) {
         refSugar: true,
         inlineTemplate: true
       })
+      if (compiledScript.bindings) {
+        finalCode += `\n/* Analyzed bindings: ${JSON.stringify(
+          compiledScript.bindings,
+          null,
+          2
+        )} */`
+      }
       finalCode +=
         `\n` + rewriteDefault(compiledScript.content, COMP_IDENTIFIER)
     } catch (e) {