mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
fix(i18n): make i18n.routing
fields optional (#10165)
* fix(i18n): make `i18n.routing` fields optional * update user config * Update packages/astro/src/core/config/schema.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> --------- Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
This commit is contained in:
parent
9b78c99275
commit
d50dddb71d
2 changed files with 48 additions and 43 deletions
5
.changeset/large-planets-kick.md
Normal file
5
.changeset/large-planets-kick.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes an issue where the `i18n.routing` object had all its fields defined as mandatory. Now they all are optionals and shouldn't break when using `astro.config.mts`.
|
|
@ -1492,7 +1492,7 @@ export interface AstroUserConfig {
|
||||||
* URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
|
* URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
|
||||||
* Localized folders are used for every language, including the default.
|
* Localized folders are used for every language, including the default.
|
||||||
*/
|
*/
|
||||||
prefixDefaultLocale: boolean;
|
prefixDefaultLocale?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @docs
|
* @docs
|
||||||
|
@ -1521,7 +1521,7 @@ export interface AstroUserConfig {
|
||||||
* })
|
* })
|
||||||
*```
|
*```
|
||||||
* */
|
* */
|
||||||
redirectToDefaultLocale: boolean;
|
redirectToDefaultLocale?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name i18n.routing.strategy
|
* @name i18n.routing.strategy
|
||||||
|
@ -1532,7 +1532,8 @@ export interface AstroUserConfig {
|
||||||
*
|
*
|
||||||
* - `"pathname": The strategy is applied to the pathname of the URLs
|
* - `"pathname": The strategy is applied to the pathname of the URLs
|
||||||
*/
|
*/
|
||||||
strategy: 'pathname';
|
strategy?: 'pathname';
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name i18n.domains
|
* @name i18n.domains
|
||||||
|
@ -1574,7 +1575,6 @@ export interface AstroUserConfig {
|
||||||
*/
|
*/
|
||||||
domains?: Record<string, string>;
|
domains?: Record<string, string>;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
/** ⚠️ WARNING: SUBJECT TO CHANGE */
|
/** ⚠️ WARNING: SUBJECT TO CHANGE */
|
||||||
db?: Config.Database;
|
db?: Config.Database;
|
||||||
|
|
Loading…
Reference in a new issue