mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-30 11:16:12 +08:00
feat(dev): support multi-entry (#5945)
This commit is contained in:
parent
6503e55277
commit
6663f84e5c
12
play/main.ts
12
play/main.ts
@ -1,8 +1,10 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './src/App.vue'
|
||||
|
||||
import '@element-plus/theme-chalk/src/index.scss'
|
||||
;(async () => {
|
||||
const apps = import.meta.glob('./src/*.vue')
|
||||
const name = location.pathname.replace(/^\//, '') || 'App'
|
||||
const App = (await apps[`./src/${name}.vue`]()).default
|
||||
const app = createApp(App)
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.mount('#play')
|
||||
app.mount('#play')
|
||||
})()
|
||||
|
@ -4,7 +4,7 @@
|
||||
"allowJs": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"types": ["../typings/global"],
|
||||
"types": ["vite/client", "../typings/global"],
|
||||
"resolveJsonModule": true,
|
||||
"moduleResolution": "Node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
Loading…
Reference in New Issue
Block a user