Use Webpack's webpack.DefinePlugin to assign a value (a serialized JSON object) to a global variable at compile time. This global variable can then be assigned to the i18next "resources" property to initialize translations.
In the root folder, with npm run:
npm install