Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: compile-time router optimization #95

Open
lukeed opened this issue Sep 26, 2021 · 0 comments
Open

build: compile-time router optimization #95

lukeed opened this issue Sep 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@lukeed
Copy link
Owner

lukeed commented Sep 26, 2021

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.

@lukeed lukeed added the enhancement New feature or request label Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant