posva / unplugin-vue-router

Next Generation file based typed routing for Vue Router
https://uvr.esm.is
MIT License
1.47k stars 67 forks source link

URL encode brackets in file path #415

Closed Xa3lis closed 1 month ago

Xa3lis commented 1 month ago

Hello !

We have a problem in our project where the [ and the ] are blocked by the GKE traefik module (Unauthorized characters i guess)

We were using Vue plugin pages before and it had a "nuxt routeStyle" (https://github.com/hannoeru/vite-plugin-pages#routestyle) and it was using a pages/xxx/_dynamicParam/index.vue format

The _xxx was working, but the [xxx] format is blocked

Is there a way to use _xxx format within this lib or is there a way to URL encode the path before it's handled by Vite ?

Thank's !

posva commented 1 month ago

I couldn't find a lot of information about GKE traefik module other than it being related to Kubernetes. If the characters are unauthorized, it's probably necessary to configure it but I don't know how so I would move this to a discussion.

Regarding the old format _xxx, there is no way to use it and no plans to support it since Nuxt 3 doesn't support it either, it creates fragmentation in the ecosystem for tools, and it would require a considerable rewrite to this plugin and any existing extensions