-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3_lazyRouteDiscovery
does not respect Vite#base
configuration
#10124
Comments
I'm seeing a 404 on https://github.com/hanford/remix-fogOfWar-base - can you check the permissions on that?
Can you elaborate on your use case? Knowing what you're expected dev/prod setups are would help us ensure we've got the use cases handled properly. To my recollection, when we did our initial |
Made the repo public! My situation is as follows, I have ~10 separate frontend applications being served on different paths...
We have a reverse proxy in front of our applications that looks at the path of an incoming requests, and proxies it to the correct place. These applications link to one another, share session information, UI components, and from a users perspective, it's just one application. We aren't using Remix's
However, we are using Vite#base, so that our application artifacts (JS/other assets) are prefixed with the applications base path so at the router level we know where to send requests for it's assets. So, we want to enable lazyRouteDiscovery, but need the __manifest.json request to be prefixed with basePath similar to other application artifacts otherwise at the router level, we don't which application the request should go to. Hopefully this makes sense, happy to provide more details or try alternative Remix/Vite configurations. Today we're actually a full Next.js shop (with our own patches on top of Next.js) and using a combination of Next.js features that enable this whole setup to work. We're trying to emulate the current setup w/ Remix to hopefully migrate some (or all) applications to Remix. |
We also hit this issue when trying to adopt Looks like this means we'll need to adopt basename before migrating to v7. Quite a big change as the basename is passed manually everywhere to redirects and fetchers etc. |
Reproduction
I’ve noticed that in the latest Remix release, v2.13.1,
v3_lazyRouteDiscovery
does not respect Vite’sbase
configuration.After looking into the source code, it appears that while
lazyRouteDiscovery
respects Remix’s basename, however the two configuration options are for different purposes.Ideally, I’d like the
__manifest
file to be prefixed with Vite’sbase
configuration (aligning it with all other JS being served).It's my understanding that all assets are served under this base (similar to how webpack publicPath) if provided; however, __manifest is not, which is causing an error.
An asset that works (respecting Vite's base)
v3_lazyRouteDiscovery
not respecting thebase
, thus 404'ingReproduction:
https://github.com/hanford/remix-fogOfWar-base
System Info
Used Package Manager
pnpm
Expected Behavior
__manifest
should be servered frombase + __manifest
Actual Behavior
__manifest
doesn't respect Vite's base, which leads to a 404 breaking the future flagThe text was updated successfully, but these errors were encountered: