Skip to content

Commit

Permalink
Update packages/next-swc/crates/next-core/src/env.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Will Binns-Smith <wbinnssmith@gmail.com>
  • Loading branch information
timneutkens and wbinnssmith committed Sep 28, 2023
1 parent c9559d7 commit 77e35d4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/next-swc/crates/next-core/src/env.rs
Expand Up @@ -150,6 +150,16 @@ pub async fn env_for_js(
);

map.insert(
"__NEXT_I18N_DOMAINS".to_string(),
// Don't stringify undefined
match next_config.i18n.as_ref() {
Some(i18n) => match i18n.domains.as_ref() {
Some(domains) => serde_json::to_string(domains)?,
None => "undefined".to_string(),
},
None => "undefined".to_string(),
},
);
"__NEXT_I18N_DOMAINS".to_string(),
// Don't stringify undefined
if let Some(i18n) = next_config.i18n.as_ref() {
Expand Down

0 comments on commit 77e35d4

Please sign in to comment.