Skip to content

Disable router for all links #6914

Closed
@MaximeMenotti

Description

@MaximeMenotti

Describe the problem

I use sveltekit in a micro-frontend like usage, injecting html and js generated by svelte-kit in another website.
I used router=false option to avoid sveltekit to interfere with the router of the receiving site but keep hydration to activate some js interaction.

Since this PR was merged I should use this to keep same usage:

old: router = false / hydrate = true -> new: csr = true + set data-sveltekit-reload if you want native navigations

Unfortunately receiving site links like <a href="/">Homepage</a> are still caught by sveltekit router even if I set data-sveltekit-reload in <html> tag of the receiving site.

Describe the proposed solution

Bring back another configuration field router set to true by default.
As csr and ssr fields add a way to configure this new field in page.js or layout.js

Alternatives considered

No response

Importance

i cannot use SvelteKit without it

Additional Information

I don't have all the history of the changes of router field, I hope this issue was not already studied.
It was a very convenient feature for me, I hope I can find a solution.
I can make the PR with proposed solution if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions