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
For vue-router v2.0.0 path-to-regexp was moved from a dependency to a dev dependency (thanks @pi0 for finding the commit).
Unfortunately the commit doesnt list a reason why this was (probably mostly security/political?), but I think it could make sense to keep path-to-regexp as an external dependency for non-browser builds.
One reason is that Nuxt.js also uses e.g. the tokensToFunction method of path-to-regexp. This means that currently a Nuxt.js app will include two copies of that function, one from vue-router and one from Nuxt.js itself which increases the bundle size needlessly.
Another solution for the above could be that vue-router would expose the path-to-regexp methods like tokensToFunction method so Nuxt.js can use those, but using dependencies has more benefits ofc like quicker delivery of patches for path-to-regexp.
What problem does this feature solve?
For vue-router v2.0.0
path-to-regexp
was moved from a dependency to a dev dependency (thanks @pi0 for finding the commit).Unfortunately the commit doesnt list a reason why this was (probably mostly security/political?), but I think it could make sense to keep
path-to-regexp
as an external dependency for non-browser builds.One reason is that Nuxt.js also uses e.g. the
tokensToFunction
method ofpath-to-regexp
. This means that currently a Nuxt.js app will include two copies of that function, one from vue-router and one from Nuxt.js itself which increases the bundle size needlessly.Another solution for the above could be that
vue-router
would expose the path-to-regexp methods liketokensToFunction
method so Nuxt.js can use those, but using dependencies has more benefits ofc like quicker delivery of patches forpath-to-regexp
.What does the proposed API look like?
Revert: 76d83b6
The text was updated successfully, but these errors were encountered: