You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the gzipped library size is 2KB, 70% of which is path-to-regexp dependency. While path-to-regexp provides a well-known way for developer to describe routes, it seems like we could shrink it's functionality to cover the 99% of use cases.
It would be cool to reimplement a limited subset of the library, so that:
We drop that dependency and make it a zero-dependency library 😎
We reduce the size to be less than 1KB (current bundle size without a matcher is 686B).
For users who still want to use the path-to-regexp functionality and get an advanced syntax we could provide an optional entry point:
Right now the gzipped library size is 2KB, 70% of which is
path-to-regexp
dependency. Whilepath-to-regexp
provides a well-known way for developer to describe routes, it seems like we could shrink it's functionality to cover the 99% of use cases.It would be cool to reimplement a limited subset of the library, so that:
For users who still want to use the
path-to-regexp
functionality and get an advanced syntax we could provide an optional entry point:So ideally it would be nice to define a subset of features we would like to support. Here are my ideas:
/:foo/:bar
:foo?
,:foo*
and:foo+
/:foo(\d+)/
The text was updated successfully, but these errors were encountered: