vue3-core/playground/src/main.ts

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

13 lines
349 B
TypeScript
Raw Normal View History

2024-01-31 17:00:19 +08:00
import { render, unmountComponent } from 'vue/vapor'
2023-11-17 03:01:19 +08:00
const modules = import.meta.glob<any>('./*.(vue|js)')
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 instance = render(mod, {}, '#app')
// @ts-expect-error
globalThis.unmount = () => {
unmountComponent(instance)
}
})