This technique had been working, installed the latest npm version and it's broken.
routes.add('entity', '/entity/:actor_id/:tab')
routes.add('entity', '/entity/:actor_id')
/node_modules/next-routes/dist/index.js:89
throw new Error('Route "' + name + '" already exists');
^
Error: Route "entity" already exists
Sorry! A route name must be unique, but you can do this in one line:
routes.add('entity', '/entity/:actor_id/:tab?') // <- note "?"
Oh nice, thank you, missed that syntax.
Most helpful comment
Sorry! A route name must be unique, but you can do this in one line: