kit icon indicating copy to clipboard operation
kit copied to clipboard

Warn developer if there is no slot in layout

Open mallsoft opened this issue 2 years ago • 0 comments

Describe the problem

+layout.svelte can be created with a tiny but annoying footgun. No <slot/> in it.

This can be confusing for new as well as seasoned devs as to why content isn't being rendered.

Describe the proposed solution

Have a warning in the console for "+layout.svelte - is missing a <slot/> and therefore no content will be rendered".

Alternatives considered

Render content with no slot tag, but this would probably be even more confusing for at least new devs.

Importance

would make my life easier

Additional Information

No response

mallsoft avatar Nov 22 '22 21:11 mallsoft