Skip to content

PoC: Vite plugin for build-time router optimization with PreparedRegExpRouter #336

@taku-hatano

Description

@taku-hatano

Hi team!

I built a PoC Vite plugin that replaces Hono's default router with a PreparedRegExpRouter at build time.

The full implementation and details are available in the README of my repository:
https://github.com/taku-hatano/hono-jsx-dom-with-vite

Bundle size comparison of dist/_worker.js from vite build:

Bundle Size
Before 26.88 kB
After 19.71 kB

7.17 kB reduction (26.7%)

Note: benchmarks have not been conducted yet.

I hope this could be useful for the team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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