Skip to content

Reuse default +layout.js and +layout.server.js in named layout.  #6196

Closed
@stalkerg

Description

@stalkerg

Describe the problem

If I want to have a second root layout, just a different "layout" (+layout.svelte) I should copy-paste +layout.js and +layout.server.js.
In old routing, schema duplicate was only inside __layout.js load function. Even if I move load function to a separate file, I will duplicate two extra files for each named layout.

Describe the proposed solution

To reduce boilerplate, the named layout should have a way to reuse the default layout client and server functions.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions