@sprlab/wccompiler 0.5.5 → 0.5.6
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/lib/tree-walker.js +8 -0
- package/package.json +1 -1
package/lib/tree-walker.js
CHANGED
|
@@ -74,6 +74,14 @@ export function walkTree(rootEl, signalNames, computedNames, propNames = new Set
|
|
|
74
74
|
if (node.nodeType === 1) {
|
|
75
75
|
const el = /** @type {Element} */ (node);
|
|
76
76
|
|
|
77
|
+
// Skip <template #name> elements — they are slot content passed to child components
|
|
78
|
+
// Their interpolations are resolved by the provider, not the consumer
|
|
79
|
+
if (el.tagName === 'TEMPLATE') {
|
|
80
|
+
for (const attr of Array.from(el.attributes)) {
|
|
81
|
+
if (attr.name.startsWith('#')) return;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
// Detect <slot> elements — replace with <span data-slot="..."> placeholder
|
|
78
86
|
if (el.tagName === 'SLOT') {
|
|
79
87
|
const slotName = el.getAttribute('name') || '';
|
package/package.json
CHANGED