修复引优化导致的产品库目录路径异常的问题

This commit is contained in:
aixianling
2022-08-26 14:03:04 +08:00
parent fc695b80f7
commit dc4a9761e9
2 changed files with 11 additions and 8 deletions

View File

@@ -20,7 +20,8 @@ export default {
if (file.default) {
let {name, label} = file.default,
addApp = {
name: path.replace(/\.\/?(vue)?/g, '')?.split("/").join("_"), label: label || name,
name: [base, path.replace(/\.\/?(vue)?/g, '')?.split("/")].flat().join("_"),
label: label || name,
path: `/${base}${path.replace(/\.(\/.+\/App.+)\.vue$/, '$1')}`,
component: appEntry,
module: file.default