@lwc/template-compiler 5.2.2 → 6.0.0
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.js +15 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -13086,7 +13086,10 @@ class CodeGen {
|
|
|
13086
13086
|
// Depth-first traversal. We assign a partId to each element, which is an integer based on traversal order.
|
|
13087
13087
|
while (stack.length > 0) {
|
|
13088
13088
|
const node = stack.shift();
|
|
13089
|
-
|
|
13089
|
+
// Skip comment nodes in parts count, as they will be stripped in production, unless when `lwc:preserve-comments` is enabled
|
|
13090
|
+
if (!isComment(node) || this.preserveComments) {
|
|
13091
|
+
partId++;
|
|
13092
|
+
}
|
|
13090
13093
|
if (isElement(node)) {
|
|
13091
13094
|
// has event listeners
|
|
13092
13095
|
if (node.listeners.length) {
|
|
@@ -13671,6 +13674,16 @@ function transform(codeGen) {
|
|
|
13671
13674
|
data.push(property$1(identifier('styleDecls'), styleAST));
|
|
13672
13675
|
}
|
|
13673
13676
|
}
|
|
13677
|
+
else if (name === 'slot') {
|
|
13678
|
+
let slotValue;
|
|
13679
|
+
if (isExpression$1(value)) {
|
|
13680
|
+
slotValue = codeGen.bindExpression(value);
|
|
13681
|
+
}
|
|
13682
|
+
else {
|
|
13683
|
+
slotValue = isStringLiteral(value) ? literal$1(value.value) : literal$1('');
|
|
13684
|
+
}
|
|
13685
|
+
data.push(property$1(identifier('slotAssignment'), slotValue));
|
|
13686
|
+
}
|
|
13674
13687
|
else {
|
|
13675
13688
|
rest[name] = computeAttrValue(attr, element, !addSanitizationHook);
|
|
13676
13689
|
}
|
|
@@ -13842,5 +13855,5 @@ function compile(source, config) {
|
|
|
13842
13855
|
exports.compile = compile;
|
|
13843
13856
|
exports.default = compile;
|
|
13844
13857
|
exports.parse = parse;
|
|
13845
|
-
/** version:
|
|
13858
|
+
/** version: 6.0.0 */
|
|
13846
13859
|
//# sourceMappingURL=index.cjs.js.map
|