I initialized i18n translation object once in a component ( first component that loads in the app ) . That same object is required In all other components. I do
i18n
Can keep global variables in webpack i.e. in webpack.config.js
webpack.config.js
externals: { 'config': JSON.stringify(GLOBAL_VARIABLE: "global var value") }
In js module can read like
var config = require('config') var GLOBAL_VARIABLE = config.GLOBAL_VARIABLE
Hope this will help.