Replies: 2 comments 1 reply
-
You would need to make |
Beta Was this translation helpful? Give feedback.
-
Thanks for the prompt reply. The above was just a contrived example. In a legacy product which I am trying to migrate, there are lot of URLs of the form
Now prefix-1 has different features. prefix-2 has different features. I have already implemented what you suggested... but that is making all the browser bundles to be packaged into a single bundle which makes the bundle loftly. I understand why this has happened as it is a single route and remix/vite has ended up doing it. Thats why I want to split into multiple routes for each prefix so that I am able to achieve code splitting properly. I am just curious on why we couldnt support dynamic/regex based things on a URL segment when Remix React Router has solved all other things. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I understand that Remix allows one to define dynamic segment to match a particular route as given in https://remix.run/docs/en/main/file-conventions/routes#dynamic-segments.
However, I want to match <>/gold-rate-*.html to be matching a particular route file. The * could point to any country or city and thus there are so many combinations. Unfortunately, I am not able to change the URL for legacy reasons because there is already a google SEO score built for these URLs. How can I migrate to Remix and still ensure that all the urls like
<>/gold-rate-us.html
<>/gold-rate-jp.html
<>/gold-rate-in.html
all map to the same route file gold-rate-$place.tsx.
Again please note that the wildcard is not a complete segment but part of a URL segment. Depending on the placeId, the route file will query a Database and then render the results
Beta Was this translation helpful? Give feedback.
All reactions