The exports field in package.json defines 76 subpaths. Each maps to its own compiled module (see Build and release pipeline), so importing hono/logger pulls in the logger and its direct imports -- nothing else. This page groups them by role; the authoritative list is the exports object itself.

Every entry follows the same triple shape:

package.json
"./tiny": {
  "types": "./dist/types/preset/tiny.d.ts",
  "import": "./dist/preset/tiny.js",
  "require": "./dist/cjs/preset/tiny.js"
},

Core entries

Subpath Contents
hono The Hono class with the default SmartRouter (RegExpRouter + TrieRouter), Context, core types
hono/hono-base HonoBase -- the router-less base class, for building custom presets
hono/request HonoRequest
hono/types Standalone type exports
hono/http-exception HTTPException
hono/validator The validator() middleware factory that schema-validation middleware build on
hono/router, hono/router/* The Router interface and each implementation (reg-exp-router, trie-router, smart-router, linear-router, pattern-router) individually importable

Presets: same class, different router

hono/quick and hono/tiny are ~20-line files that subclass HonoBase with a different router choice:

src/preset/tiny.ts
export class Hono<
  E extends Env = BlankEnv,
  S extends Schema = BlankSchema,
  BasePath extends string = '/',
> extends HonoBase<E, S, BasePath> {
  constructor(options: HonoOptions<E> = {}) {
    super(options)
    this.router = new PatternRouter()
  }
}
Preset Router setup Intended for
hono SmartRouter([RegExpRouter, TrieRouter]) Long-lived processes; fastest steady-state matching
hono/quick SmartRouter([LinearRouter, TrieRouter]) Per-request initialization environments where registration speed dominates
hono/tiny PatternRouter only Minimal bundle size

Middleware (hono/<name>)

Every directory under src/middleware/ is an export: basic-auth, bearer-auth, body-limit, cache, combine, compress, context-storage, cors, csrf, etag, ip-restriction, jsx-renderer, jwk, jwt, language, logger, method-not-allowed, method-override, powered-by, pretty-json, request-id, secure-headers, serve-static (base for adapter variants), timeout, timing, trailing-slash.

Helpers (hono/<name>)

From src/helper/: accepts, adapter, conninfo, cookie, css, dev, factory, html, proxy, route, ssg, streaming, testing, and ws (the WebSocket helper, src/helper/websocket/). Helpers are functions you call inside handlers (or test code), as opposed to middleware you register.

Client and JSX

  • hono/client -- the typed hc RPC client.
  • hono/jsx, hono/jsx/jsx-runtime, hono/jsx/jsx-dev-runtime -- server-side JSX.
  • hono/jsx/dom (+ its own jsx-runtime) -- the client-side DOM runtime with hooks.
  • hono/jsx/streaming -- Suspense-style streaming rendering.

Runtime adapters (hono/<runtime>)

aws-lambda, bun, cloudflare-pages, cloudflare-workers, deno, lambda-edge, netlify, service-worker, vercel -- each re-exporting the runtime-specific serveStatic, upgradeWebSocket, getConnInfo, and related glue documented in Web Standards as the platform.

Utilities (hono/utils/*)

Internal building blocks exported for reuse: hono/utils/jwt is declared explicitly, and a ./utils/* wildcard export covers the rest of src/utils/ (cookie, http-status, url, body, ...). These are the lowest-level surface -- prefer the corresponding helper or middleware when one exists.

JSR mirror

The same map is duplicated in jsr.json for the JSR registry, and build/build.ts fails the build if the two files' export keys diverge in either direction.

Sources: package.json, src/preset/*.ts · last synced 2026-08-10 · 26de731 · version 4.13.1