@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.js
CHANGED
|
@@ -13062,7 +13062,10 @@ class CodeGen {
|
|
|
13062
13062
|
// Depth-first traversal. We assign a partId to each element, which is an integer based on traversal order.
|
|
13063
13063
|
while (stack.length > 0) {
|
|
13064
13064
|
const node = stack.shift();
|
|
13065
|
-
|
|
13065
|
+
// Skip comment nodes in parts count, as they will be stripped in production, unless when `lwc:preserve-comments` is enabled
|
|
13066
|
+
if (!isComment(node) || this.preserveComments) {
|
|
13067
|
+
partId++;
|
|
13068
|
+
}
|
|
13066
13069
|
if (isElement(node)) {
|
|
13067
13070
|
// has event listeners
|
|
13068
13071
|
if (node.listeners.length) {
|
|
@@ -13647,6 +13650,16 @@ function transform(codeGen) {
|
|
|
13647
13650
|
data.push(property$1(identifier('styleDecls'), styleAST));
|
|
13648
13651
|
}
|
|
13649
13652
|
}
|
|
13653
|
+
else if (name === 'slot') {
|
|
13654
|
+
let slotValue;
|
|
13655
|
+
if (isExpression$1(value)) {
|
|
13656
|
+
slotValue = codeGen.bindExpression(value);
|
|
13657
|
+
}
|
|
13658
|
+
else {
|
|
13659
|
+
slotValue = isStringLiteral(value) ? literal$1(value.value) : literal$1('');
|
|
13660
|
+
}
|
|
13661
|
+
data.push(property$1(identifier('slotAssignment'), slotValue));
|
|
13662
|
+
}
|
|
13650
13663
|
else {
|
|
13651
13664
|
rest[name] = computeAttrValue(attr, element, !addSanitizationHook);
|
|
13652
13665
|
}
|
|
@@ -13816,5 +13829,5 @@ function compile(source, config) {
|
|
|
13816
13829
|
}
|
|
13817
13830
|
|
|
13818
13831
|
export { ElementDirectiveName, LWCDirectiveDomMode, LWCDirectiveRenderMode, LwcTagName, RootDirectiveName, TemplateDirectiveName, compile, compile as default, parse };
|
|
13819
|
-
/** version:
|
|
13832
|
+
/** version: 6.0.0 */
|
|
13820
13833
|
//# sourceMappingURL=index.js.map
|