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

sveltekit-fire

v0.0.16

Published

TODO

Readme

Sveltekit Fire

Sveltekit Fire Logo

Integrate Svelte Kit projects with Firebase effortlessly!

Check the full documentation here:

Documentation

Getting Started

To install Sveltekit Fire run on your terminal

npm install -D sveltekit-fire

You will probably need to use other modules from firebase. If you do so, make sure you install firebase js sdk v9+

npm install -D firebase

Now you'll need to create a new app inside a Firebase project. Make sure to choose the option web

Svelte Configuration

if you instaleld firebase js sdk v9+, by the time this documentation is written, you will need to add the following code to yours svelte.config.js file:

kit : {
...
	vite: {
		ssr: {
			external: ['firebase']
		}
	}
}
...

Firebase Configuration

Sveltekit Fire uses .env files to store firebase configuration data in order to provide a cleaner code and the ability to lazily initialize Firebase from multiple components.

A .env file will look like this

VITE_PUBLIC_FIREBASE_API_KEY="YOUR_API_KEY"
VITE_PUBLIC_FIREBASE_AUTH_DOMAIN="YOUR_AUTH_DOMAIN"
VITE_PUBLIC_FIREBASE_DATABASE_URL="YOUR_DATABASE_URL"
VITE_PUBLIC_FIREBASE_PROJECT_ID="YOUR_PROJECT_ID"
VITE_PUBLIC_FIREBASE_STORAGE_BUCKET="YOUR_STORAGE_BUCKET"
VITE_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="YOUR_MESSAGING_SENDER_ID"
VITE_PUBLIC_FIREBASE_APP_ID="YOUR_APP_ID"
VITE_PUBLIC_FIREBASE_MEASUREMENT_ID="YOUR_MEASUREMENT_ID"
VITE_PUBLIC_FIREBASE_USE_ANALYTICS=true
VITE_PUBLIC_FIREBASE_USE_PERFORMANCE=true
VITE_PUBLIC_FIREBASE_USER_PERSISTENCE="local"

Initializing Firebase

Now you can initialize Firebase like this:

<!-- __layout.svelte -->
<script>
	import { initFirebase } from 'sveltekit-fire';

	initFirebase();
</script>

But dont worry, if you don't initialize Firebase, it will automatically be initialized only once whenever a Sveltekit Fire component is used.

Server Side Rendering

Although Sveltekit Fire is compatible with ssr, it's not yet fully supported. For instance, collections and documents that require a logged user are not compatible with ssr.

Disclaimer

This lib was initially intendend to be a PR to the awesome codediodeio/sveltefire written by Jeff Delaney. But as the work progressed, in order to maximize the benefits of firebase js sdk 9.0+ and sveltekit the project started to grow in a very different way so I decided to create a new lib.
Some of the code was heavily inspired by the sveltefire project.

Complete Documentation

The full documentation is available here