Skip to content

Commit 6b40dc6

Browse files
authored
refactor: partially fix slot forwarding in SSR (#4999)
1 parent e829c8b commit 6b40dc6

File tree

44 files changed

+264
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+264
-8
lines changed

packages/@lwc/engine-server/src/__tests__/fixtures/slot-forwarding/slots/dangling/error.txt

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<x-dangling-container>
2+
<x-slot>
3+
<x-leaf>
4+
<!---->
5+
<h1 slot="bottom">
6+
bottom content
7+
</h1>
8+
<!---->
9+
<!---->
10+
<h1>
11+
top content
12+
</h1>
13+
<!---->
14+
</x-leaf>
15+
</x-slot>
16+
</x-dangling-container>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const tagName = 'x-dangling-container';
2+
export { default } from 'x/container';
3+
export * from 'x/container';
4+
export const features = [];
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template lwc:render-mode="light">
2+
<x-slot>
3+
<h1 slot="top">top content</h1>
4+
<h1 slot="bottom">bottom content</h1>
5+
</x-slot>
6+
</template>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class extends LightningElement {
4+
static renderMode = 'light';
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<template lwc:render-mode="light">
2+
<slot name="top" slot="bottom"></slot>
3+
<slot name="bottom"></slot>
4+
</template>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class extends LightningElement {
4+
static renderMode = 'light';
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template lwc:render-mode="light">
2+
<x-leaf>
3+
<slot name="top" slot="bottom"></slot>
4+
<slot name="bottom" slot="top"></slot>
5+
</x-leaf>
6+
</template>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class extends LightningElement {
4+
static renderMode = 'light';
5+
}

packages/@lwc/engine-server/src/__tests__/fixtures/slot-forwarding/slots/light/error.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)