Skip to content

Replace Polka in adapter-node with a maintained web server #16140

Description

@Mnwa

Describe the problem

@sveltejs/adapter-node builds on top of Polka as its underlying web server. Polka appears to have stalled as a project, which is a concern for a server that powers production SvelteKit deployments.

Evidence of the maintenance gap:

Relying on an effectively unmaintained dependency for the default Node server means bug fixes, security patches, and Node.js compatibility updates may never land, and downstream SvelteKit users have no clear path to get them.

Describe the proposed solution

Swap the web server that adapter-node uses for an actively maintained alternative, or move to a minimal in-house request handler so the adapter no longer depends on Polka.

Possible directions to evaluate:

  • Use a maintained minimal router/server such as Hono, or @hono/node-server, which is actively developed and works well with Web-standard Request/Response.
  • Use a small, actively maintained alternative in the same spirit as Polka.
  • Replace Polka with a thin internal handler built directly on Node's http/http2 modules, since adapter-node only needs basic routing/middleware and this removes an external dependency entirely.

Goals/constraints for the replacement:

  • Preserve current behavior and configuration (host/port/socket via env vars, ORIGIN/proxy headers handling, body size limits, compression, static asset serving).
  • No (or minimal) breaking changes for existing adapter-node users.
  • Active maintenance and ongoing Node.js version compatibility.

Happy to help test or contribute a PR if there's agreement on a preferred direction.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionNot sure if we want to do this yet, also design work needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions