Open dallyh opened 7 months ago
Could this be related to https://github.com/withastro/astro/issues/10558?
Probably yes, the warning is also in the console:
@bluwy do you have any idea why the define
API doesn't create the global object in window
?
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When virtual module astro:i18n is used in client side script, for example to get a relative locale URL with
getRelativeLocaleUrl
, an error is logged to the console, thus preventing the use of the module. This only happens in adev
server, build is fine.Uncaught ReferenceError: __ASTRO_INTERNAL_I18N_CONFIG__ is not defined at i18n.js?v=d5a38680:4:56
What's the expected result?
Virtual module astro:i18n should be usable in client scripts while running a dev server.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kuyvpf?file=src%2Fpages%2Findex.astro
Participation