修复库工程无法看到自动生成的模块
This commit is contained in:
12
bin/serve.js
12
bin/serve.js
@@ -11,6 +11,18 @@ const getFileInfo = (app, file) => {
|
|||||||
} else
|
} else
|
||||||
app.style = {navigationBarTitleText: app.label}
|
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'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user