Skip to content

build: compile-time router optimization #95

@lukeed

Description

@lukeed

Already have a PoC for this done – using Babel, but can be anything.

The idea is to remove the Router and regexparam code entirely from the output, even though the Router itself is < 900 bytes and regexparam is less than 400b.

This was a driving feature for #82 – which unfortunately couldn't be part of the initial #94 work. Tried to make worktop.build entirely with swc/core, but not feasible at this time.

Requires AST traversal and modifications. Hoping for evanw/esbuild#1297 (comment) but may end up having to write my own TS parser or bringing in Babel 😖 Major overkill for data/tooling that's already there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions