@pinegrow/vite-plugin 3.0.0-beta.37 → 3.0.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/vue-plugin.js +17 -1
- package/package.json +1 -1
package/dist/vue-plugin.js
CHANGED
|
@@ -11,6 +11,22 @@ export function usePinegrow() {
|
|
|
11
11
|
// console.log('Cache initialized by Pinegrow Vue Plugin!')
|
|
12
12
|
const elCache = reactive(new Map())
|
|
13
13
|
|
|
14
|
+
// const enRichWithComponentName = elCacheObj => {
|
|
15
|
+
// return {
|
|
16
|
+
// name:
|
|
17
|
+
// getComponentName(elCacheObj.instance.type, elCacheObj.localFile) +
|
|
18
|
+
// `${elCacheObj.key !== undefined && elCacheObj.key !== null ? ` (${elCacheObj.key})` : ''}`,
|
|
19
|
+
// ...elCacheObj,
|
|
20
|
+
// }
|
|
21
|
+
// }
|
|
22
|
+
|
|
23
|
+
const enRichWithComponentName = elCacheObj => {
|
|
24
|
+
return {
|
|
25
|
+
name: elCacheObj.instance.type.__name || '',
|
|
26
|
+
...elCacheObj,
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
14
30
|
const rootFragmentToPgIdComputed = computed(() => {
|
|
15
31
|
const rootEls = new Map()
|
|
16
32
|
for (let [key, value] of elCache.entries()) {
|
|
@@ -55,7 +71,7 @@ export function usePinegrow() {
|
|
|
55
71
|
if (!localComponents[value.localFile]) {
|
|
56
72
|
localComponents[value.localFile] = []
|
|
57
73
|
}
|
|
58
|
-
localComponents[value.localFile].push(value)
|
|
74
|
+
localComponents[value.localFile].push(enRichWithComponentName(value))
|
|
59
75
|
}
|
|
60
76
|
}
|
|
61
77
|
return localComponents
|