You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For file based routing Vinxi adds query params to filenames for pick options like page.tsx?pick=default. These query params cause some vite plugins to choke (as they are expecting filename strings to end with extension).
I'm currently able to get around this by forking these plugins and passing the filenames through vite's cleanUrl utility before rolling along.
I'm not sure what the best solution to this is, but don't think that current status quo of breaking vite plugins that have an expectation of file extensions coming at end of filename strings is a great state to be in.
One final note: for one of my projects this issue only arose for vinxi build runs, and the query params were somehow stripped during vinxi dev. However, when I was writing the stackblitz example query params weren't being stripped in either case.
The text was updated successfully, but these errors were encountered:
Yeah this has been a thing I have thought about, in some ways I'm stuck .. I need to add these differentiators in the moduleIds that make them different, vite uses this pattern too in places to process files specially so I am usually surprised people are expecting to get by without stripping the query Params from the module id .. vite cleans it up before resolving it and so by not add a prefix and a query Param instead I can use the default vite resolver which would be tricky to replicate .. step 1 is to detect this case maybe and then show a warning
For file based routing Vinxi adds query params to filenames for
pick
options likepage.tsx?pick=default
. These query params cause some vite plugins to choke (as they are expecting filename strings to end with extension).Stackblitz example.
I'm currently able to get around this by forking these plugins and passing the filenames through vite's cleanUrl utility before rolling along.
I'm not sure what the best solution to this is, but don't think that current status quo of breaking vite plugins that have an expectation of file extensions coming at end of filename strings is a great state to be in.
One final note: for one of my projects this issue only arose for
vinxi build
runs, and the query params were somehow stripped duringvinxi dev
. However, when I was writing the stackblitz example query params weren't being stripped in either case.The text was updated successfully, but these errors were encountered: