Closed itaie01 closed 1 month ago
Hello and thanks for reporting, Firstly, this issue doesn't seem to be related to Lingui itself but rather to tooling configuration.
Can you please create a Minimal, Reproducible Example that we can see the issue with? The most effective reproducible examples are created by starting a new project from scratch and adding in only the necessary pieces to reproduce the issue. Without this, the issue is not actionable from my end.
Alternatively, you can get around without the top-level await - either turn getI18nInstance
to async and await its result in the components, or use lingui compile
to get the compiled catalog ahead of time.
Thank you 🙂
Describe the bug Hello again, I have tried reimplementing i18n as per the swc example app provided. I seem to have run into an issue with setI18n, where I keep receiving the following errors.
This one in the NextJS dev console:
and this one in the browser:
When I add config.experiments = { topLevelAwait: true }; to the NextJS webpack config, this error goes away, but the pages of the website never build, even in dev mode. I have ensured that the i18n object is not null/undefined, so I am not sure what the issue at hand is.
Would appreciate if anyone can help dissect this issue.
npm list @babel/core
@lingui/swc-plugin
4.0.7