Open DellanX opened 1 year ago
Thanks!
Maybe this could be possible by allowing the plugin to be instantiated multiple times and exposing each of them via different module vue-router/auto-1
etc
Oooo, yes that's actually a great idea in my opinion.
Though, preferably we'd be able to add an alias such as: "vue-router/auto-chat"
This package is amazing, though I think I may have a complicated use case to mess things up.
As of now, I have a laravel project with 3 subdomains, each has different routes available to them:
I need to be able to generate different route configurations for the subdomains independent of each other.
Excess information
For the purpose of development, I used this plugin with
routesFolder
to populate all 3 sets on all 3 subdomains. The issue is that the API doesn't serve routes outside of the subdomain. (e.g. calendar API doesn't work on chat pages). Fine for development; however, for production a 404 should page appear instead.What I'd prefer to be able to do, is add a route folder during runtime, so that each entry point only needs to add its specific routes. Or even better, to be able to load this in the vite config somehow? (maybe through output.plugins?)
That being said, I can't imagine how this could be added to the output.plugins setting in a way that doesn't destructively merge. As of now, if I try this, vite throws an error stating that vue-router/auto does not exist