We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9183069 commit 9e529f8Copy full SHA for 9e529f8
packages/sfc-playground/src/Header.vue
@@ -27,6 +27,12 @@ const { store } = props
27
const currentCommit = __COMMIT__
28
const vueVersion = ref(`@${currentCommit}`)
29
30
+const vueURL = store.getImportMap().imports.vue
31
+if (vueURL && !vueURL.startsWith(location.origin)) {
32
+ const versionMatch = vueURL.match(/runtime-dom@([^/]+)/)
33
+ if (versionMatch) vueVersion.value = versionMatch[1]
34
+}
35
+
36
async function setVueVersion(v: string) {
37
vueVersion.value = `loading...`
38
await store.setVueVersion(v)
0 commit comments