Skip to content

Commit

Permalink
Update packages/astro/src/i18n/vite-plugin-i18n.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
  • Loading branch information
lilnasy and bluwy authored Jan 29, 2024
1 parent 0666a05 commit 288128f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/astro/src/i18n/vite-plugin-i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ export default function astroInternationalization({
enforce: 'pre',
config(config) {
const i18nConfig: I18nInternalConfig = { base, format, site, trailingSlash, i18n };
config.define ??= {}
config.define.__ASTRO_INTERNAL_I18N_CONFIG__ = JSON.stringify(i18nConfig);
return {
define: {
__ASTRO_INTERNAL_I18N_CONFIG__: JSON.stringify(i18nConfig)
}
}
},
resolveId(id) {
if (id === virtualModuleId) {
Expand Down

0 comments on commit 288128f

Please sign in to comment.