1
0

main.tsx 610 B

123456789101112131415161718192021
  1. import { createRoot } from 'react-dom/client'
  2. import { atlasConfig } from '@/config'
  3. import { BUILD_ENV } from '@/config/env'
  4. import { AssetLogger, SentryLogger } from '@/utils/logs'
  5. import { App } from './App'
  6. const initApp = async () => {
  7. if (BUILD_ENV === 'production') {
  8. SentryLogger.initialize(atlasConfig.analytics.sentry?.dsn)
  9. AssetLogger.initialize(atlasConfig.analytics.assetLogs?.url)
  10. }
  11. // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  12. const container = document.getElementById('root')!
  13. const root = createRoot(container)
  14. root.render(<App />)
  15. }
  16. initApp()