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

fix(wxs): module.exports => export default

上级 5c86f67a
......@@ -25,7 +25,10 @@ ${code}
</script>`
)
}
return `${rewriteDefault(code, '_sfc_' + type)}
return `${rewriteDefault(
code.replace(/module\.exports\s*=/, 'export default '),
'_sfc_' + type
)}
export default Comp => {
if(!Comp.mixins){Comp.mixins = []}
Comp.mixins.push({beforeCreate(){ this['${(query as any).name}'] = this }})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册