I'm now getting this error:
__layout.reset has been removed in favour of named layouts: https://kit.svelte.dev/docs/layouts#named-layouts
I have a sub-directory for which I do not want to inherit the base layout.
$ find . -name '*layout*'
./setup-profile/__layout.reset.svelte
./auth/__layout.reset.svelte
./__layout.svelte
package.json has
"@sveltejs/kit": "next",
The doc page you linked is pretty self-explanatory.
Edit:
Overall the simpler way is to create a named reset layout at the root of your source tree containing a simple <slot />
, and reference that layout whenever you want to start from a reset layout:
src/routes/
├ auth/
│ ├ [email protected] (will inherit from the reset layout)
│ ├ pageA.svelte
│ └ pageB.svelte
├ setup-profile/
│ ├ [email protected] (will inherit from the reset layout)
│ ├ pageA.svelte
│ └ pageB.svelte
├ no-reset/
│ ├ __layout.svelte (will inherit from the base layout)
│ ├ pageA.svelte
│ └ pageB.svelte
├ __layout.svelte
└ __layout-reset.svelte
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With