vue3-core/playground/src/main.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
462 B
TypeScript
Raw Normal View History

/// <reference types="vite/client" />
import { createVaporApp } from 'vue/vapor'
import { createApp } from 'vue'
2024-02-13 03:19:15 +08:00
import './style.css'
2023-11-17 03:01:19 +08:00
const modules = import.meta.glob<any>('./**/*.(vue|js|ts)')
2023-11-24 20:29:05 +08:00
const mod = (modules['.' + location.pathname] || modules['./App.vue'])()
2024-01-31 17:00:19 +08:00
mod.then(({ default: mod }) => {
const app = (mod.vapor ? createVaporApp : createApp)(mod)
app.mount('#app')
// @ts-expect-error
globalThis.unmount = () => {
app.unmount()
2024-01-31 17:00:19 +08:00
}
})