You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler throws some really weird error, which doesn't make much logical sense. It seems that the use case was simply forgotten from what it looks like:
Module build failed (from ./node_modules/svelte-loader/index.js):
Error: ValidationError: 'slot' is reserved for future use in named slots (20:18)
18: <header>
19: <Navbar {classNames}>
20: <NavBrand slot="nav-brand" />
^
21: </Navbar>
22: </header>
Well, I am using it in named slot. The warning I suppose was intended to prevent people using slot as a prop name for component.
Um.. well slots are in the compiler now. They just don't work on components. Documentation doesn't seem to mention this as far as I've checked.
There is obviously a few poor man's workarounds like wrapping components in html elements - bad, because it throws off styling and makes working with css frameworks difficult.
Another one is to use svelte:component directive, but this prevents passing props.
The text was updated successfully, but these errors were encountered:
Just as an example:
https://svelte.dev/repl/45154c3f669543b39e1515d6bfe7fa14?version=3.5.1
The compiler throws some really weird error, which doesn't make much logical sense. It seems that the use case was simply forgotten from what it looks like:
Well, I am using it in named slot. The warning I suppose was intended to prevent people using slot as a prop name for component.
Um.. well slots are in the compiler now. They just don't work on components. Documentation doesn't seem to mention this as far as I've checked.
There is obviously a few poor man's workarounds like wrapping components in html elements - bad, because it throws off styling and makes working with css frameworks difficult.
Another one is to use
svelte:component
directive, but this prevents passing props.The text was updated successfully, but these errors were encountered: