-
-
Notifications
You must be signed in to change notification settings - Fork 432
Conversation
Hey, very cool PR here! I've been looking for something like this. I have a couple of questions:
|
@alexdilley Yes, that's the way it works. My questions are concerning the output generated by the PR. Regarding the first question, I want it to generate non-hashed routes. |
|
I haven't dug into the code, but reading around it seems there wouldn't be much more to do to Sapper itself and probabl to this PR to handle non-hash based routing because it's basically what it does already, am I right? Just asking because you're surely in a better position to judge than me at this point. |
Yes, Sapper use pathname routing. Sapper can handle any valid route with build-in server. I choose hash-based routing because when creating SPA I want use dependency as less as possible. Use hash-based routing I just need a place only support serve http request for static file, no more complex config for server rewrite. |
I think We need two switch to control 6 scenarios:
My project is working in cordova, so 4 and 6 are what I need. And I can just change some switch to turn the project to working on modern browser in the future. @saabi Is 5 that what you expect? |
@dishuostec Nice work! Yes, 5 is what I need. I haven't tested it yet, but splitting |
use {
"scripts": {
"dev": "sapper dev --ssr=false",
"build": "sapper build --legacy --ssr=false",
"export": "sapper export --legacy --ssr=false"
}
} |
…nstructor or null" on dist/CheapWatch.es.js:34:26
Thanks for putting together this PR! Sapper never had a good method of handling configuration, which made it difficult to know how to integrate this feature. However, that's been addressed in SvelteKit and we'd like to add the feature there (sveltejs/kit#231). I'm going to go ahead and close this PR since we won't be adding the feature to Sapper, but if you'd like to try taking a stab at adding it to SvelteKit we will review PRs for this feature there |
@benmccann are you saying SPA mode is still NOT possible in svelte-kit? |
It's not yet, but we'd like to add it. It should be a pretty easy feature to add |
Rich wrote these exact words years ago for Sapper! LOL! 😄 |
Jokes aside, in their defense, during this year they had to rethink the whole Sapper architecture from a self-made one to using Snowpack, and then recently going for Vite for SvelteKit. |
I love Rich, Svelte and all of you guys. No problem. We will wait. The work you are doing is crazy! ❤️ |
#383
Add
--spa--ssr, --hashbang to dev, build and export command.Without
--spa--ssr=false, --hashbang, nothing changed.With
--spa--ssr=false:With --hashbang:
Example spa-template.