'In Nuxt 3, can I specify a global sub-directory for all routing

I would like to specify a global sub-directory that precedes all routing, for both client and API endpoints. So:

https://my-site.com/dir/api/* (for all API routes) https://my-site.com/dir/somepage

I would like to control this at a routing level vs. a deployment level. Is there a good way to configure it as such?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source