---
title: "Presets and Builds"
description: "The presets and builds system provides specialized distribution bundles, entry points, and routing optimizations tailored for different runtime performance characteristics and footprint constraints..."
last_updated: "2026-10-12T08:14:12.710392+00:00"
canonical_url: "https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/presets-and-builds"
---

<details>
<summary>Relevant source files</summary>

The following files were used as context for generating this wiki page:

- [src/preset/quick.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts)
- [package.json](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json)
- [src/preset/tiny.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts)
- [src/middleware/compress/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/compress/index.ts)
- [src/helper/ssg/ssg.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/ssg/ssg.ts)
- [jsr.json](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json)
- [src/middleware/jsx-renderer/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/jsx-renderer/index.ts)
- [src/hono-base.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/hono-base.ts)
- [src/adapter/lambda-edge/handler.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/adapter/lambda-edge/handler.ts)
- [src/middleware/ip-restriction/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/ip-restriction/index.ts)
- [src/middleware/cache/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/cache/index.ts)
- [src/helper/adapter/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/adapter/index.ts)
- [runtime-tests/deno-jsx/deno.precompile.json](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/runtime-tests/deno-jsx/deno.precompile.json)
- [src/context.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/context.ts)
- [src/hono.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/hono.ts)
- [src/helper/ssg/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/ssg/index.ts)
- [src/helper/proxy/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/proxy/index.ts)
- [src/adapter/cloudflare-pages/handler.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/adapter/cloudflare-pages/handler.ts)
- [perf-measures/bundle-check/scripts/check-bundle-size.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts)
- [src/middleware/pretty-json/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/pretty-json/index.ts)
- [src/helper/css/common.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/css/common.ts)
- [src/router/linear-router/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/router/linear-router/index.ts)
- [src/middleware/serve-static/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/serve-static/index.ts)
- [src/adapter/netlify/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/adapter/netlify/index.ts)
- [src/middleware/body-limit/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/middleware/body-limit/index.ts)
- [src/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/index.ts)
- [src/adapter/netlify/handler.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/adapter/netlify/handler.ts)
- [runtime-tests/deno/deno.json](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/runtime-tests/deno/deno.json)
- [src/helper/accepts/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/helper/accepts/index.ts)
- [src/router/reg-exp-router/index.ts](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/router/reg-exp-router/index.ts)
</details>

## Overview

The presets and builds system provides specialized distribution bundles, entry points, and routing optimizations tailored for different runtime performance characteristics and footprint constraints. Hono delivers standard functionality through its core router composition while offering lightweight distribution presets such as `[[Application Core]]` routing alternatives, package export mappings across `package.json` and `jsr.json`, and automated bundle size auditing harnesses [[src/preset/quick.ts:1-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L1-L23), [[package.json:37-67](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L67), [[src/preset/tiny.ts:1-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L1-L19), [[jsr.json:8-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L106), [perf-measures/bundle-check/scripts/check-bundle-size.ts:1-50](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L1-L50). Sources: [src/preset/quick.ts:1-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L1-L23), [package.json:37-67](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L67), [src/preset/tiny.ts:1-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L1-L19), [jsr.json:8-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L106), [perf-measures/bundle-check/scripts/check-bundle-size.ts:1-50](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L1-L50)

## Preset Architecture and Entry Points

### Specialized Distribution Entry Points

Hono exposes multiple public distribution entry points designed for different runtime environments, bundle size thresholds, and routing performance profiles. The standard entry point at `.` resolves to the main package distribution, while specialized preset modules such as `[[Application Core]]` routing bundles target restricted environments [package.json:37-67](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L67), [jsr.json:8-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L106).

Hono organizes its distribution bundles across standard CommonJS, ESM, and type definition outputs defined in `package.json` and registry manifests in `jsr.json`. Consumers can import specialized presets directly from subpaths such as `./quick` and `./tiny` to optimize their application build output [package.json:37-67](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L67), [jsr.json:8-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L106).

| Export Subpath | Type Definitions | ESM Output | CommonJS Output | Preset Purpose |
| -------------- | ---------------- | ---------- | --------------- | -------------- |
| `.` | `./dist/types/index.d.ts` | `./dist/index.js` | `./dist/cjs/index.js` | Standard multi-router entry point |
| `./quick` | `./dist/types/preset/quick.d.ts` | `./dist/preset/quick.js` | `./dist/cjs/preset/quick.js` | `[[Application Core]]` with `SmartRouter` (Linear + Trie) |
| `./tiny` | `./dist/types/preset/tiny.d.ts` | `./dist/preset/tiny.js` | `./dist/cjs/preset/tiny.js` | `[[Application Core]]` with lightweight `PatternRouter` |

Sources: [package.json:37-67](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L67), [jsr.json:8-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L106)

### Architectural Trade-Offs

The standard package entry point imports from `./hono`, allowing developers to leverage comprehensive feature sets across middlewares and helpers [src/index.ts:17-53](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/index.ts#L17-L53). In contrast, specialized presets bypass default router selections by extending `HonoBase` directly with targeted routing engines [src/preset/quick.ts:6-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L6-L23), [src/preset/tiny.ts:6-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6-L19). 

> [!NOTE]
> The `hono/quick` preset initializes a `SmartRouter` composed of `LinearRouter` and `TrieRouter` instances, whereas `hono/tiny` instantiates a single `PatternRouter` to minimize initialization overhead [src/preset/quick.ts:20-22](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L20-L22), [src/preset/tiny.ts:18-18](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L18-L18).

Sources: [src/preset/quick.ts:6-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L6-L23), [src/preset/tiny.ts:6-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6-L19), [src/index.ts:17-53](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/index.ts#L17-L53)

## Quick Preset Router Composition

### Smart Router Initialization and Composition

The `hono/quick` preset constructs an optimized subclass of `[[Application Core]]` by extending `HonoBase` and instantiating a `SmartRouter` within its constructor [src/preset/quick.ts:13-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L13-L23). Rather than binding to a single routing strategy, `SmartRouter` receives an array containing both a `LinearRouter` and a `TrieRouter` instance [src/preset/quick.ts:20-22](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L20-L22). 

```typescript
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 SmartRouter({
      routers: [new LinearRouter(), new TrieRouter()],
    })
  }
```
Sources: [src/preset/quick.ts:13-23](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L13-L23)

> [!NOTE]
> The `hono/quick` preset relies on module resolution from `../router/linear-router`, `../router/smart-router`, and `../router/trie-router` to assemble its multi-strategy matching engine [src/preset/quick.ts:8-10](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L8-L10).

Sources: [src/preset/quick.ts:8-10](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L8-L10)

### Fallback Mechanics and Execution Flow

| Component Class | Import Path | Role in `SmartRouter` Composition |
| --------------- | ----------- | --------------------------------- |
| `LinearRouter` | `../router/linear-router` | Fast linear scanning for simpler route tables [src/preset/quick.ts:8](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L8), [src/preset/quick.ts:21](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L21) |
| `TrieRouter` | `../router/trie-router` | Prefix tree matching for complex parameter patterns [src/preset/quick.ts:10](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L10), [src/preset/quick.ts:21](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L21) |
| `SmartRouter` | `../router/smart-router` | Composite wrapper managing router selection and fallback [src/preset/quick.ts:9](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L9), [src/preset/quick.ts:20-22](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L20-L22) |

Sources: [src/preset/quick.ts:8-10](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L8-L10), [src/preset/quick.ts:20-22](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/quick.ts#L20-L22)

## Tiny Preset for Constrained Runtimes

### Pattern-Based Dispatch Mechanics

The `hono/tiny` preset configures a minimal application footprint by extending `HonoBase` with the lightweight `PatternRouter` engine [src/preset/tiny.ts:6-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6-L19). Instantiating `Hono` within this module assigns a `PatternRouter` directly to `this.router`, omitting complex multi-router selection logic and reducing overall binary weight for constrained execution environments [src/preset/tiny.ts:16-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L16-L19).

```typescript
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()
  }
}
```
Sources: [src/preset/tiny.ts:11-20](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L11-L20)]

> [!NOTE]
> The `hono/tiny` implementation accepts generic type parameters for environment bindings (`Env`), schema validation (`Schema`), and base path prefixes (`BasePath`), passing options directly to the `HonoBase` superclass constructor [src/preset/tiny.ts:11-17](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L11-L17).

Sources: [src/preset/tiny.ts:11-17](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L11-L17)

### Class and Type Configuration

| Exported Symbol | Source Path | Type Definition / Role |
| --------------- | ----------- | ---------------------- |
| `Hono` | `src/preset/tiny.ts` | Subclass of `HonoBase` enforcing `PatternRouter` [src/preset/tiny.ts:6-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6-L19) |
| `HonoBase` | `../hono-base` | Core routing and middleware execution engine [src/preset/tiny.ts:6](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6), [src/preset/tiny.ts:15](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L15) |
| `PatternRouter` | `../router/pattern-router` | Lightweight pattern-matching router backend [src/preset/tiny.ts:8](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L8), [src/preset/tiny.ts:18](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L18) |
| `HonoOptions` | `../hono-base` | Configuration options interface for instantiation [src/preset/tiny.ts:7](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L7), [src/preset/tiny.ts:16](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L16) |

Sources: [src/preset/tiny.ts:6-19](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/src/preset/tiny.ts#L6-L19)]

## Package Export Maps and Module Resolution

### Node.js Package Configuration and Conditional Exports

The `package.json` file establishes dual CommonJS and ES Module distribution channels alongside TypeScript declaration mappings [package.json:5-8](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L5-L8), [package.json:37-42](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L42). The root export configuration maps types, ESM imports, and CommonJS requires for core modules, presets, middleware, helpers, and utilities [package.json:37-144](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L144).

| Export Key | Types Path | Import Path (ESM) | Require Path (CJS) |
| ---------- | ---------- | ----------------- | ------------------ |
| `.` | `./dist/types/index.d.ts` [package.json:39](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L39) | `./dist/index.js` [package.json:40](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L40) | `./dist/cjs/index.js` [package.json:41](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L41) |
| `./request` | `./dist/types/request.d.ts` [package.json:44](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L44) | `./dist/request.js` [package.json:45](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L45) | `./dist/cjs/request.js` [package.json:46](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L46) |
| `./tiny` | `./dist/types/preset/tiny.d.ts` [package.json:59](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L59) | `./dist/preset/tiny.js` [package.json:60](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L60) | `./dist/cjs/preset/tiny.js` [package.json:61](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L61) |
| `./quick` | `./dist/types/preset/quick.d.ts` [package.json:64](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L64) | `./dist/preset/quick.js` [package.json:65](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L65) | `./dist/cjs/preset/quick.js` [package.json:66](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L66) |
| `./compress` | `./dist/types/middleware/compress/index.d.ts` [package.json:114](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L114) | `./dist/middleware/compress/index.js` [package.json:115](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L115) | `./dist/cjs/middleware/compress/index.js` [package.json:116](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L116) |

Sources: [package.json:37-117](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L37-L117)

> [!NOTE]
> The postbuild script executes `publint` to validate export map correctness, and copies `package.cjs.json` into distribution subdirectories to enforce CommonJS resolution boundaries [package.json:28-30](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L28-L30).

Sources: [package.json:28-30](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/package.json#L28-L30)

### JSR and Deno Module Resolution

The `jsr.json` manifest defines direct TypeScript source mappings for JSR distribution, targeting Deno and modern edge runtimes [jsr.json:1-106](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L1-L106). It enables the `sloppy-imports` unstable flag and specifies compiler options tailored for DOM and Deno namespaces [jsr.json:4-7](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L4-L7).

```json
"exports": {
  ".": "./src/index.ts",
  "./request": "./src/request.ts",
  "./types": "./src/types.ts",
  "./hono-base": "./src/hono-base.ts",
  "./tiny": "./src/preset/tiny.ts",
  "./quick": "./src/preset/quick.ts",
  "./http-exception": "./src/http-exception.ts",
  "./basic-auth": "./src/middleware/basic-auth/index.ts",
  "./bearer-auth": "./src/middleware/bearer-auth/index.ts",
  "./body-limit": "./src/middleware/body-limit/index.ts",
  "./ip-restriction": "./src/middleware/ip-restriction/index.ts",
  "./cache": "./src/middleware/cache/index.ts",
  "./route": "./src/helper/route/index.ts",
  "./cookie": "./src/helper/cookie/index.ts",
  "./accepts": "./src/helper/accepts/index.ts",
  "./compress": "./src/middleware/compress/index.ts",
  "./context-storage": "./src/middleware/context-storage/index.ts",
  "./cors": "./src/middleware/cors/index.ts",
  "./csrf": "./src/middleware/csrf/index.ts",
  "./etag": "./src/middleware/etag/index.ts",
  "./trailing-slash": "./src/middleware/trailing-slash/index.ts",
  "./html": "./src/helper/html/index.ts",
  "./css": "./src/helper/css/index.ts",
  "./jsx": "./src/jsx/index.ts",
  "./jsx/jsx-dev-runtime": "./src/jsx/jsx-dev-runtime.ts",
  "./jsx/jsx-runtime": "./src/jsx/jsx-runtime.ts",
  "./jsx/streaming": "./src/jsx/streaming.ts",
  "./jsx-renderer": "./src/middleware/jsx-renderer/index.ts",
```
Sources: [jsr.json:8-36](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L8-L36)

Publish configuration within `jsr.json` explicitly includes source files, configuration manifests, and documentation while excluding test files [jsr.json:107-110](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L107-L110). Runtime test configurations like `runtime-tests/deno/deno.json` bind [JSX runtime](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/jsx-runtime) imports to local source files and configure standard library dependencies [runtime-tests/deno/deno.json:1-13](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/runtime-tests/deno/deno.json#L1-L13).

Sources: [jsr.json:107-110](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/jsr.json#L107-L110), [runtime-tests/deno/deno.json:1-13](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/runtime-tests/deno/deno.json#L1-L13)]

## Bundle Size Auditing and Enforcement

To prevent performance regressions and maintain minimal footprints across core distribution files, Hono uses an automated bundle measurement harness driven by `esbuild`. The check script compiles the built entry point `dist/index.js` into an isolated temporary file using production settings, extracts exact byte and kilobyte measurements, and outputs structured benchmark JSON for validation pipelines.

```typescript
async function main() {
  const tempDir = os.tmpdir()
  const tempFilePath = path.join(tempDir, 'bundle.tmp.js')

  try {
    await esbuild.build({
      entryPoints: ['dist/index.js'],
      bundle: true,
      minify: true,
      format: 'esm' as esbuild.Format,
      target: 'es2022',
      outfile: tempFilePath,
    })

    const bundleSize = fs.statSync(tempFilePath).size
    const metrics = []
```
Sources: [perf-measures/bundle-check/scripts/check-bundle-size.ts:6-21](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L6-L21)

| Configuration Property | Target Value | Purpose |
| ---------------------- | ------------ | ------- |
| `entryPoints` | `['dist/index.js']` | Specifies the compiled core bundle input file [perf-measures/bundle-check/scripts/check-bundle-size.ts:12](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L12) |
| `bundle` | `true` | Resolves and inlines all internal module dependencies [perf-measures/bundle-check/scripts/check-bundle-size.ts:13](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L13) |
| `minify` | `true` | Strips whitespace and mangles identifiers to measure production delivery size [perf-measures/bundle-check/scripts/check-bundle-size.ts:14](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L14) |
| `format` | `'esm'` | Enforces ECMAScript module output format [perf-measures/bundle-check/scripts/check-bundle-size.ts:15](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L15) |
| `target` | `'es2022'` | Sets the JavaScript language syntax target level [perf-measures/bundle-check/scripts/check-bundle-size.ts:16](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L16) |
| `outfile` | `tempFilePath` | Writes output to an OS temporary directory path [perf-measures/bundle-check/scripts/check-bundle-size.ts:17](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L17) |

Sources: [perf-measures/bundle-check/scripts/check-bundle-size.ts:11-18](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L11-L18)

> [!WARNING]
> The auditing harness guarantees cleanup by executing file deletion inside a `finally` block, ensuring temporary artifacts are wiped even if the compilation pass encounters errors [perf-measures/bundle-check/scripts/check-bundle-size.ts:45-49](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L45-L49).

Sources: [perf-measures/bundle-check/scripts/check-bundle-size.ts:45-49](https://github.com/blade47/hono/blob/e50df01453e71b071c3e6136b161b160b9fdf916/perf-measures/bundle-check/scripts/check-bundle-size.ts#L45-L49)]

## Related

- [Application Core](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/application-core)
- [Router Contracts](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/routing/router-contracts)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/llms.txt) for all pages in this wiki.
