提交 dc3b31f7 编写于 作者: fxy060608's avatar fxy060608

chore(h5): ignore export context

上级 2c765045
......@@ -61,6 +61,8 @@ function parseApiExport({
})
}
const CONTEXTS = ['VideoContext', 'MapContext', 'EditorContext']
function parseExports(node, t, file) {
if (t.isFunctionDeclaration(node)) {
return [node.id.name]
......@@ -74,6 +76,10 @@ function parseExports(node, t, file) {
return specifier.exported.name
})
} else {
if (t.isClassDeclaration(node) && CONTEXTS.includes(node.id.name)) {
// ignore
return
}
console.warn('\n')
console.warn(`${file} 解析 export 失败`, node)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册