调整代码生成和分包列入热更新开发范围

This commit is contained in:
aixianling
2022-05-11 16:52:54 +08:00
parent 526d7b9209
commit fd72e6a23f
19 changed files with 77 additions and 44 deletions

View File

@@ -69,13 +69,15 @@ export default {
},
getApps() {
this.apps = []
let applications = require.context('../mods', true, /\.(\/.+)\/App[^\/]+\.vue$/)
applications.keys().map(path => {
if (applications(path).default) {
let {name: key, appName: name} = applications(path).default
this.apps.push({key, name, path: path.replace(/^\.(.+).vue$/g, '$1')})
}
})
// let applications = require.context('../', true, /\.(\/.+)\/App[^\/]+\.vue$/, 'lazy')
// applications.keys().map(path => {
// applications(path).then(file => {
// if (file.default) {
// let {name: key, appName: name} = file.default
// this.apps.push({key, name, path: path.replace(/^\.(.+).vue$/g, '$1')})
// }
// })
// })
},
getAuth() {
this.$nextTick(() => {