npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@svelte-router/kit

v1.0.0

Published

> Hash router for Sveltekit projects

Readme

@svelte-router/kit

Hash router for Sveltekit projects

This is an extension package for webJose's Svelte Router, and enables the use of the router in hash mode in Sveltekit projects.

Why Would I Need This?

Sveltekit has an excellent file-based router. You should always stick to the built-in router for routing your application. However, as with every other router in existence, you can only do path routing or hash routing, but not both.

webJose's Svelte Router router was born to break this barrier: This SPA router can do path and hash routing simultaneously. However, this is a router for SPA's and PWA's that render on the client. It was not designed for SSR scenarios. After all, Sveltekit has routing capabilities included.

But what if you wanted to do hash routing on top of Sveltekit's path routing? You can today, with this router extension.

Useful Scenarios

  1. You could show a complex dialog box that is driven by hash routing.
  2. You could mount your application as a micro-frontend that routes with multiple paths in the hash fragment.
  3. You could drive your tabs components with individual named hash paths (this is demonstrated in this repository's demo project).

Quickstart

  1. Install the package
    npm install @svelte-router/kit # This also installs the @svelte-router/core main package
  2. Initialize the library. Ideally, in the root +layout.svelte component:
    <script lang="ts">
        import { init } from "@svelte-router/kit";
    
        init(/* options */);
    </script>
  3. Add routers, routes and links for hash navigation as you please. Note that these are still imported from the core package, @svelte-router/core.
  4. EXCEPTION: Don't use the core package's Fallback component. Use this package's KitFallback component for fallback content to avoid flashes of unwanted content when rendering on the server.

⚡ Attention!

There might be a bug in Svelte or Sveltekit. Situation: Just importing init from @svelte-router/kit triggers error rune_outside_svelte on the trace.svelte.js file in the @svelte-router/core package. To overcome this, just add { ssr: { noExternal: ["@svelte-router/core"] }} to Vite's configuration.

If this becomes unneeded, this warning will be removed; if this is just the reality of things, this warning will become one more step in the quickstart.

Limitations

  1. Path routing is disallowed.

Generally speaking, you need to understand the core router, so have handy its online documentation.