initializeMain.tsx 599 B

12345678910111213141516
  1. import {Config} from 'sentry/types';
  2. import {initializeLocale} from './initializeLocale';
  3. export async function initializeMain(config: Config) {
  4. // This needs to be loaded as early as possible, or else the locale library can
  5. // throw an exception and prevent the application from being loaded.
  6. //
  7. // e.g. `app/constants` uses `t()` and is imported quite early
  8. await initializeLocale(config);
  9. // This is dynamically imported because we need to make sure locale is configured
  10. // before proceeding.
  11. const {initializeApp} = await import('./initializeApp');
  12. initializeApp(config);
  13. }