import './app.css'

// Only load and mount the app in a real browser (document + mount available).
// Avoids "mount() is not available on the server" when the bundle runs in SSR/workers.
let app = null
const target = typeof document !== 'undefined' && document.getElementById('app')
if (target) {
  const { mount } = await import('svelte')
  const { default: App } = await import('./App.svelte')
  app = mount(App, { target })
}

export default app
