Compare commits
No commits in common. '5cecb98484b5e1cf7ed2890078a4930eab8f6e7e' and '0b271bc3527a14338c6852375f3ca2307fc6d932' have entirely different histories.
5cecb98484
...
0b271bc352
@ -1,13 +1,9 @@
|
||||
import { mount } from 'svelte'
|
||||
import './app.css'
|
||||
import App from './App.svelte'
|
||||
|
||||
// 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 })
|
||||
}
|
||||
const app = mount(App, {
|
||||
target: document.getElementById('app'),
|
||||
})
|
||||
|
||||
export default app
|
||||
|
||||
Loading…
Reference in new issue