-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
refactor: pass generated options through runtimeConfig
#2828
refactor: pass generated options through runtimeConfig
#2828
Conversation
Yes! |
skipSettingLocaleOnNavigate: options.skipSettingLocaleOnNavigate, | ||
differentDomains: options.differentDomains, | ||
trailingSlash: options.trailingSlash, | ||
configLocales: options.locales, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm π€
I would also prefer locales
instead of configLocales
if possible.
It seems that locales
have been introduced by this PR.
#2446
In v9, we should also be organized runtimeConfig.
locales
should be domainLocales
and configLocales
should be locales
.
@BobbieGoede
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In v9, we should also be organized runtimeConfig.
locales should be domainLocales and configLocales should be locales.
Agreed, that sounds good! I have added a reference in the roadmap discussion #2814
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Okay, I'll merge this PR!
π Linked issue
β Type of change
π Description
Replaces #2734
I would still like to improve the type in
ModulePublicRuntimeConfig
so users know which values cannot be configured usingruntimeConfig
, for example those used during route generation, should I mark these@internal
using JSDocs?By using
runtimeConfig
to pass the generated options we can reduce the complexity of our generated options templates (#build/i18n.options.mjs
and#internal/i18n/options.mjs
) and will make it easier for us to addruntimeConfig
support for options used exclusively during runtime (detectBrowserLanguage
for example).I had to add
configLocales
to the runtime config aslocales
was already used for runtime domain support, we should probably merge these configurations for v9.π Checklist