54 Commits

Author SHA1 Message Date
Richard Harris
8baf694e6d revert previous unpleasantness 2019-06-09 20:10:56 -04:00
Richard Harris
b6e2736eb0 always re-run preload functions when query string changes - fixes #701 2019-05-20 23:45:39 -04:00
Richard Harris
aa31e3ca6a refactor slightly 2019-05-20 23:11:50 -04:00
Richard Harris
8b310dd458 Merge branch 'issues/688' of https://github.com/btakita/sapper into btakita-issues/688 2019-05-20 23:08:58 -04:00
Brian Takita
5460896228 Checking the current_branch[i] route match against the current request's route match.
current_branch[i].match.slice(1, i+2) compared to match.slice(1, i+2)

Fixes https://github.com/sveltejs/sapper/issues/688
2019-05-20 23:03:08 -04:00
Conduitry
b59d9003f9 leave anchor scrolling on initial load to browser (#331) 2019-05-13 08:56:21 -04:00
mrkishi
62969d59f6 Abort infinite loop for preload errors 2019-05-09 10:40:23 -03:00
Richard Harris
133ac07ed2 remove some unused imports 2019-05-09 09:26:49 -04:00
mrkishi
54e92c3b99 Regularize page and server routes
Treats both page and server routes similarly in regards to indexes.

It's a (somewhat) breaking change: server routes will accept trailing
slashes to match page routes behavior, but only if there's no extension.

We still need a stronger support for dealing with different clean urls
rules.
2019-05-08 12:24:45 -03:00
mrkishi
5cba40b7e0 Refactor compose_handlers and ignore 2019-05-05 14:51:22 -03:00
Richard Harris
c0ada5c52f handle skipped segments 2019-05-05 11:36:02 -04:00
Rich Harris
afeedf6bb2 give each app its own page, preloading and session stores, using context 2019-04-29 14:52:19 -04:00
Rich Harris
1bc7096a9e Merge pull request #591 from thgh/redirect-basepath
Fix redirect with basepath
2019-04-29 11:43:51 -04:00
Rich Harris
02e0aeb8a2 merge master -> artemjackson-patch-3 2019-04-29 11:22:21 -04:00
Rich Harris
9725767fe2 Merge pull request #593 from thgh/patch-4
Provide session in layout preload
2019-04-27 12:19:58 -04:00
Rich Harris
4f9919e95c Merge pull request #610 from cudr/navigate_fix
Navigate from /a/[id] to /b/[id] fix
2019-04-27 11:56:03 -04:00
Rich Harris
b089ca42ff Merge pull request #608 from cudr/preload_return_fix
Don't crash if preload return empty
2019-04-27 11:15:14 -04:00
Rich Harris
6cb4030b2b Merge branch 'master' into navigate_fix 2019-04-27 11:11:27 -04:00
Rich Harris
96a068245b Merge pull request #620 from cudr/error_page_hooks
Error page lifecycle
2019-04-27 11:06:28 -04:00
Akihiko Odaki
0fd332135e Allow to have middleware for the path same with a HTML page
The feature was introduced with 9e2d0a7fbc,
but regressed with commit 8dc52a04e4.
2019-04-13 19:42:19 +09:00
Artyom Stepanishchev
06eee32ee5 Fix for #618
`query-string` is used as example

see https://github.com/sindresorhus/query-string/blob/master/index.js#L186
2019-04-08 22:56:35 +03:00
cudr
9bb8bfa884 receive preloaded root_data 2019-04-08 20:07:42 +03:00
cudr
9e60a71cf5 clean up 2019-04-06 02:50:00 +03:00
cudr
3a9d457389 execute error page hooks 2019-04-06 02:32:11 +03:00
cudr
0dd2d2eb4a complete fix 2019-03-15 04:57:10 +03:00
cudr
6bf3dd04dd fix empty preload 2019-03-13 15:18:23 +03:00
Thomas Ghysels
8858301fed Provide session in layout preload 2019-03-05 15:22:40 +01:00
Thomas Ghysels
13b64cd1bb Fix redirect with basepath
Fix #589
2019-03-03 10:40:49 +01:00
Rich Harris
e0de230e13 Slot-based routing (#573) 2019-02-21 16:34:07 -05:00
Rich Harris
9d2ce6d852 Merge pull request #563 from nolanlawson/patch-2
Remove unnecessary index.html file serve
2019-02-17 09:46:55 -04:00
Nolan Lawson
1f1211b7b4 Remove unnecessary index.html file serve
As far as I can tell, `/index.html` should no longer exist (outside of `sapper export`, which doesn't apply here). After #525 was merged, we're now using `/service-worker-index.html`, but that's handled by `get_page_handler.ts`, not here. So this code is doing nothing.
2019-02-14 19:14:14 -08:00
Thomas Ghysels
acafeac1cc Fix #561 2019-02-13 17:59:32 +01:00
Rich Harris
84a0ae562f support .svelte or .html extensions 2019-02-08 11:34:33 -05:00
Rich Harris
ca034d0857 Support Svelte 3
fixes #546, #551, #552, #554
2019-02-03 14:29:47 -05:00
Rich Harris
5573258a10 update tests 2018-09-30 11:32:58 -04:00
Rich Harris
39b1fa89ce wip 2018-01-21 11:03:23 -05:00
Rich Harris
b3027c5816 port runtime to typescript, move runtime/app.js to runtime.js 2017-12-25 17:14:39 -05:00
Rich Harris
3c4ebcda30 cancel navigation if overtaken by a second navigation - fixes #48 2017-12-24 20:37:00 -05:00
Rich Harris
c8366dec74 handle deep links 2017-12-24 07:53:39 -05:00
Rich Harris
db1c1f332a Add goto function (#46)
* WIP

* programmatic navigation

* get tests working

* wait longer
2017-12-23 13:15:40 -05:00
Rich Harris
8b50ff34b8 named exports, for tree-shakeability when we add new stuff 2017-12-17 15:01:26 -05:00
Rich Harris
e4936375db support HMR 2017-12-16 20:10:49 -05:00
Rich Harris
dccd3cdeb0 prevent default when navigating to current location 2017-12-16 10:59:46 -05:00
Rich Harris
b3b5d9f352 handle hashchange correctly 2017-12-16 08:53:42 -05:00
Rich Harris
10ddaeb7a3 dont navigate on hashchange 2017-12-16 08:16:09 -05:00
Rich Harris
7e65c481d8 doh 2017-12-15 18:34:38 -05:00
Rich Harris
67fe570f6d dont try to prevent event where none exists 2017-12-15 18:26:55 -05:00
Rich Harris
0eb96bf01f oops, remove logging 2017-12-15 16:47:29 -05:00
Rich Harris
4c61ed5fdd better link click handling, track scroll position 2017-12-15 16:46:11 -05:00
Rich Harris
e46aceb2fe implement prefetching anchors with rel=prefetch 2017-12-14 08:21:32 -05:00