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

nuxt-pglite

v0.4.2

Published

A Nuxt module aimed to simplify the use of PGlite.

Readme

nuxt-pglite

npm version npm downloads bundle size Netlify Status

PGlite tooling for Nuxt. A Postgres you don't run in development, swapped for a real one in production without touching your code; an embedded one on the server or in the browser when it is needed.

📖 Documentation — nuxt-pglite.s94.dev

Features

  • Server — a lazily created PGlite instance for your Nitro routes (usePGlite()), configured in server/pglite.config.ts with your own extensions and init.
  • Development socket — that instance served over the Postgres wire protocol while nuxt dev runs. pg, postgres.js, Drizzle, Kysely, drizzle-kit, psql reach it through DATABASE_URL (or a provider's variables), exactly as they reach Postgres in production. With the server side off, nothing of PGlite reaches the build.
  • Client — an in-browser PGlite in a Web Worker shared between tabs, with live-query composables, configured in app/pglite.config.ts. Off by default.
  • Migrations — nuxt-pglite/migrations applies a folder of SQL files from init, with the bookkeeping platforms such as Netlify Database use on deploy, and refuses files edited after they ran.
  • Testing — nuxt-pglite/testing builds databases from your config, forks them per test, serves them over the socket; nuxt-pglite/testing/vitest wires one per run.
  • DevTools — a tab with an SQL editor and actions that run on the server, in the browser or next to the socket (seed, reset, drizzle-kit…).
  • Nuxt 4 and 5 (Nitro 2 and 3), Node, Bun and Deno; @electric-sql/pglite as a peer dependency, so you pick the version and the types follow your config.

Install

npx nuxi module add nuxt-pglite
npx nypm install @electric-sql/pglite

Quickstart

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-pglite'],
})
// server/api/hello.get.ts
export default defineEventHandler(async () => {
  const pg = await usePGlite()
  return pg.query('SELECT now()')
})

PGlite in development only, a real Postgres in production:

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-pglite'],
  pglite: {
    server: { enabled: false },
    socket: true, // exports DATABASE_URL while `nuxt dev` runs
  },
})
// server/pglite.config.ts
import { applyMigrations } from 'nuxt-pglite/migrations'

export default definePGliteServerConfig({
  init: (pg) => applyMigrations(pg, 'server/database/migrations'),
})

Guides, recipes and the reference live at nuxt-pglite.s94.dev:

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install, then pnpm dev:prepare (stubs dist/, prepares the playgrounds, the test fixtures and the docs)
  • Develop with pnpm dev (playgrounds/basic), pnpm -F ./playgrounds/<name> dev (any other playground) or pnpm run docs (documentation site)
  • Run tests using pnpm test; pnpm lint, pnpm fmt and pnpm typecheck for the rest
  • Build with pnpm build; pnpm dev:prepare restores the stub afterwards

The suite also runs against the Nuxt 5 nightly, locally only until Nuxt 5 reaches a release candidate. Append the overrides to pnpm-workspace.yaml, install without the frozen lockfile, run the checks, then revert both files:

overrides:
  nuxt: npm:nuxt-nightly@5x
  '@nuxt/kit': npm:@nuxt/kit-nightly@5x
  '@nuxt/schema': npm:@nuxt/schema-nightly@5x
pnpm install --no-frozen-lockfile && pnpm typecheck && pnpm test

License

Published under the MIT license. Made by community 💛


🤖 auto updated with automd