Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

export routes not reachable by <a> elements #749

Closed
wysher opened this issue Jun 18, 2019 · 2 comments · Fixed by #825
Closed

export routes not reachable by <a> elements #749

wysher opened this issue Jun 18, 2019 · 2 comments · Fixed by #825
Labels

Comments

@wysher
Copy link

wysher commented Jun 18, 2019

For now, only way to include routes via export is to add <a> element with href attribute pointing that route in some other reachable route https://sapper.svelte.dev/docs#How_it_works

But there are cases when some routes cannot be reachable by <a>, and still needs to be exported.
In my case I have success page. When form was submitted correctly I do goto('/success').

It should be a way to pass to sapper export routes that should be exported as well. Or maybe export should not rely on <a> tag only.

@philholden
Copy link

You can use hidden links as a workaround.

<a href="hidden-links" style="visibility: hidden; position: absolute;"></a>

Then put all the links you want to hide in hidden-links.svelte

@doppelganger9
Copy link

That's a great tips, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants