-
Notifications
You must be signed in to change notification settings - Fork 27.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
i18n links are unusable in dev builds when using multiple domains #21211
Comments
Hmm it seems expected that the links would match production while developing so you don't get differing experience between development and production. If you want to avoid this from using the domains in development you can change the config value when not in production mode e.g. |
@ijjk the problem is not just whether development and production use the same domains, it's that after v10.0.5 client side navigation doesn't work for any domain that is not listed under IMHO that's not what someone would expect from the i18n domain routing config. Also the i18n docs on domain routing doesn't mention anything about being forced to use only those domains for all environments. |
Hi, this has been updated in the latest canary of Next.js |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.0.5
What version of Node.js are you using?
15.6.0
What browser are you using?
n/a
What operating system are you using?
n/a
How are you deploying your application?
next dev
Describe the Bug
Links created with
next/link
use the i18n domains fromnext.config.js
when running in development mode.That makes them unusable, since the dev server runs on
localhost:3000
and the generated links point to production.Expected Behavior
next/link
should ignore the i18n domains when running in development modeTo Reproduce
Run
npx create-next-app
, then enable i18n innext.config.js
:Add the following links somewhere in
pages/index.js
:Run
npm dev
and try clicking on these links. They will take you to google so the dev build isn't very useful.The text was updated successfully, but these errors were encountered: