-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat(remix-dev): add serverBasename
config option
#5236
Conversation
|
Thanks a lot! This would definitely be a good feature to have. Could we get an integration test for this please? |
Something I've struggled with Remix apps hosted under the same domain at my company is redirecting from loaders and actions to other apps. For example, say we have the following apps: App 1: domain.com/app1 Now say that in App 2 I return a response that should redirect to This makes it difficult to do something like redirecting to a login page that lives in the "Launchpad" app. This PR should also handle this case if it doesn't. I know that the redirect logic within remix does handle external (non-remix) routes, but only if the domain is different. Now I want remix to check the domain + this serverBasepath. I'm unsure if this logic lives in Remix or React Router right now, but I'm assuming Remix, since it's dependent on the |
I think I've discovered that the redirect issue will need to be resolved in react-router. I'll try and put together a PR over there. |
@justinwaite @kentcdodds @yracnet folks, any chance we can solve this any time soon? Any support needed with anything? @justinwaite have you put together a PR you talked about or not just yet? |
The redirect and Link changes should be tied to this bug: remix-run/react-router#10052 Looks like these will be taken care of soon. Then Remix needs to be updated to allow a base name. |
serverBasename
config option
I want to know what happened to this pr. |
What's the status with this PR? When can we expect this to land? We're about to implement something similar in our remix app suite using https://github.com/kiliman/remix-mount-routes but if this feature is about to land in remix itself then that would be my preferred option. |
We need this feature, too and investigated into implementing it ourself. If this PR is stale, how is the process to take over the work? At least @dmbarry86 mentioned implementing the desired functionality via third party libs, we can invest into it as well. |
Hi @yracnet! Are you still interested in getting this one merged? If so, please rebase onto latest |
This PR has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from PRs that are unactionable. Please reach out if you have more information for us! 🙂 |
Hi, I have implemented a plugin in ViteJS that provides support for the server's basename. You can check it out at https://www.npmjs.com/package/vite-plugin-remix |
Sad to see this PR gone, would be a helpful feature. What's the reason for not doing it the remix way, but to use vite? |
The Vite plugin seems to be using Remix internals to hack around this. I would've love to see Remix support for this because it uses React Router under the hood, which supports the EDIT: Here I'm referring to Vite itself has a |
This is what I would like to see as well, but perhaps we need to wait for vite support to stabilize more. I know that some changes are occurring with the asset paths per #8077 |
Is anyone still interested in getting this PR merged? |
I have implemented the feature described on the #2891.
This include the serverBasename attribute on remix.config.js for declare a prefix to URL
clean branch from from #4459