Can one route object handle multiple scenarios like:
/a/123/b
/b
My attempted solution is as follows:
{ path: '(a/:a)?/b', ... }
While this works in the Express route tester, it only applies to version 0.1.7 of path-to-regexp
. Newer versions escape special characters.
How can I achieve this with the latest version of path-to-regexp
used by vue-router
?