修复库工程无法看到自动生成的模块

This commit is contained in:
aixianling
2023-03-24 09:43:49 +08:00
parent 27d0d7f097
commit b5747ede8a

View File

@@ -11,6 +11,18 @@ const getFileInfo = (app, file) => {
} else
app.style = {navigationBarTitleText: app.label}
}
if (/^App/.test(app.name) && app.label) {
let {name, label} = app,
path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`)
return apps.list.push({
id: file.replace(/\.\/?(vue)?/g, '').replace(/[\\\/]/g, '_'),
name,
label,
path,
libPath: file.replace(/[\\\/]/g, '/').replace(/^src(\/.+)\.vue/, '$1'),
type: 'wxwork'
})
}
}