Skip to content
Myr

fix(hono-base): remove `.matchRoute` and reduce bundle size (#3595)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by EdamAmex · committed by GitHub · parent fea5947 · Browse files · 1 file+1 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−5 removed

  • other:+1 added−5 removed

1 file+1 added−5 removed

modified:src/hono-base.ts+1 added-5 removed
380 unmodified lines
381 this.router.add(method, path, [handler, r])382 this.routes.push(r)383 }384385 private matchRoute(method: string, path: string) {386 return this.router.match(method, path)387 }388385 private handleError(err: unknown, c: Context<E>) {386 if (err instanceof Error) {387 return this.errorHandler(err, c)388 }
12 unmodified lines
401 new Response(null, await this.dispatch(request, executionCtx, env, 'GET')))()402 }403404 const path = this.getPath(request, { env })409 const matchResult = this.matchRoute(method, path)405 const matchResult = this.router.match(method, path)406407 const c = new Context(request, {408 path,409 matchResult,
110 unmodified lines