You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* hash based routing
* tests
* fix test
* fml this took me 40 minutes to figure out
* for push/replaceState, too
* more robust tests
* please?
* change approach: make hash visible in page.url etc, require user to pass in hash links
* lint, fix test
* Apply suggestions from code review
* hashchange handling
* rename 'history' to 'pathname', update docs
* update internal jsdoc
* disable SSR and server-only files
* disallow page options at build time
* oops
* allow access to event.url.hash in hash mode
* prerender shell
* add failing reroute test
* fix
* make hash trackable
* skip test for now
* don't normalise
* lint
* i don't understand this code — even with the prior normalization it's unclear what it would do. no tests fail without it so for now i'm just gonna remove to shut typescript up
* get_route_id -> get_page_key
* detect hash changes via URL bar
---------
Co-authored-by: Rich Harris <[email protected]>
Copy file name to clipboardExpand all lines: packages/kit/src/exports/public.d.ts
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -617,6 +617,16 @@ export interface KitConfig {
617
617
*/
618
618
origin?: string;
619
619
};
620
+
router?: {
621
+
/**
622
+
* What type of client-side router to use.
623
+
* - `'pathname'` is the default and means the current URL pathname determines the route
624
+
* - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed.
625
+
*
626
+
* @default "pathname"
627
+
*/
628
+
type?: 'pathname'|'hash';
629
+
};
620
630
serviceWorker?: {
621
631
/**
622
632
* Whether to automatically register the service worker, if it exists.
0 commit comments