In production mode you should never use localization data from Tolgee REST API and you should never leak your API key. You should use data exported from Tolgee platform. To get exported localization files, see exporting translations.
You can get exported files by exporting your translations from web application. See exporting translations.
There are multiple options to provide static localization data for production builds. Providing a URL prefix where Tolgee can fetch the data from or providing imported data as reference or provider in TolgeeProvider config prop.
To provide your localization data using dynamic import you will need to add providers for every supported language to TolgeeProvider's configuration property.
Using this approach data will be fetched just when it's needed, so you will save some network traffic.
Using this approach, all localization data are bundled with your application, so it will be downloaded with your application code. This approach could be very useful for SSR, when you need your localization data imported to be rendered by your SSR engine.
This option tells Tolgee, that localization data (en.json, de.json) can be found on
so it will be fetched with every page load.