kwhitley / itty-router

A little router.
MIT License
1.81k stars 79 forks source link

UPCOMING VERSION v3.0.0 - integrating itty-router-extras into itty-router #104

Closed kwhitley closed 2 years ago

kwhitley commented 2 years ago

So this is a rather big shift/departure from the previous setup, but here are the reasons:

Thoughts?

eugene1g commented 2 years ago

I don't expect people to be as sensitive to the bundle size for Cloudflare Workers as we are with SPAs. One dependency with many exports feels more approachable, and people who are super sensitive to the size might be able to do tree-shaking during the bundling process to remove unused code

kwhitley commented 2 years ago

Yeah, I tend to agree... certainly with Workers, it's more about the convenience and how much you mesh with the implementation (read: how does your code look afterwards and how easy was it to get there), assuming the bundle isn't crazy in size (you still have limits in the size of your script).

eugene1g commented 2 years ago

Do you plan to add TypeScript types for itty-router-extras, or rewrite in TS?

kwhitley commented 2 years ago

Do you plan to add TypeScript types for itty-router-extras, or rewrite in TS?

For those, I plan to rewrite in TS... just easier than maintaining type files separately.

jacwright commented 2 years ago

I think this is a great idea. Tree-shaking will limit the code in-memory for extras not used.

kwhitley commented 2 years ago

Closing this in favor of the actual PR https://github.com/kwhitley/itty-router/pull/121