mirror of https://github.com/sveltejs/svelte
add dev runtime warning for unknown slot names (#4501)
parent
926a2aebd8
commit
f2ee7efb94
@ -0,0 +1 @@
|
||||
<slot name="slot2"></slot>
|
@ -0,0 +1,9 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
warnings: [
|
||||
'<Nested> received an unexpected slot "default".',
|
||||
'<Nested> received an unexpected slot "slot1".'
|
||||
]
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Nested from "./Nested.svelte";
|
||||
</script>
|
||||
<Nested>
|
||||
<input slot="slot1">
|
||||
<input slot="slot2">
|
||||
</Nested>
|
Loading…
Reference in new issue