Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature request: Nitro 3 support (`unwasm` export condition)

Open Beginner friendly
#1,120 2 comments 0 reactions 0 assignees View on GitHub

@pi0x is already working on this.

Since Oct 7, 2026.

  • #1121 by @pi0x — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript, wasm
Domain
build-system

Research direction

Add the unwasm export condition to the root package.json exports field to map .wasm imports to the correct build output for Nitro 3 compatibility. Verify the fix by building a minimal Nitro 3 project that imports @electric-sql/pglite and confirming the server no longer throws a missing pglite.data error on the first query.

Written by the indexing model from the issue text.

Description

New feature request
Support for Nitro 3, the server engine of Nuxt 5 and others, without extra configuration.

A Nitro 3 build bundles PGlite, and the server then fails on the first query because pglite.data is not next to the bundle:

ENOENT: no such file or directory, open '…/.output/server/_libs/pglite.data'

Repro with nitro 3.0.260903-beta, @electric-sql/pglite 0.5.8, Node 26:

// nitro.config.ts
import { defineConfig } from 'nitro'

export default defineConfig({ serverDir: './' })
// routes/index.ts
import { PGlite } from '@electric-sql/pglite'
import { defineHandler } from 'nitro/h3'

export default defineHandler(async () => (await new PGlite().query('select 1 as one')).rows)

nitro build, node .output/server/index.mjs, then GET / answers 500 with the error above.

Describe the solution you'd like
Nitro's author suggested an unwasm export condition in PGlite's package, for proper Nitro compatibility. Nitro builds with that condition and handles .wasm imports through unwasm. Would you consider it?

Dominant language
TypeScript
Stars
16.1k
Forks
447
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from electric-sql/pglite

All issues in electric-sql/pglite

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.