-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the problem
The new [email protected] syntax looks cool.
I have a thought to expand or refute:
Support for a layout, loaded externally, from a package.
Describe the proposed solution
You install the npm i packagename package that contains the layout file.
You use this layout via the package name, for example: [email protected].
That's it. :)
You could also add a built-in, external layout in SvelteKit, e.g. to reset __layout-reset.svelte:
Then use for reset [email protected], so you won't need to create an empty __layout-root.svelte, containing the <slot/> itself (as recommended in the SvelteKit documentation).
Alternatives considered
-
adder containing the layout.
-
wrapper in
__layout.sveltewith imported component:
<script>.
Import packagename from "packagename";
</script>
<Packagename><slot/></Packagename>...Such a thing doesn't work, because in Packagename you can't, for example, provide a load function.
Importance
would make my life easier
Additional Information
Such a thing would be part of a broader thinking about external modules, as related - #3723