Open jayzun opened 2 years ago
这是个BUG。感谢你的反馈😊
shouldPrependVm()
对 [objectMethod](https://babeljs.io/docs/en/babel-types#objectmethod)
类型的AST节点,错误地返回了 true,给transform()
错误地加上了_vm.
前置。
我们增加一个 t.isObjectMethod(path.container)
应该能修复问题。
欢迎你发个 PullRequest 修复这个问题!
你可以参考 CONTRIBUTING.md 调试、增加测试用例、创建 PR.
This issue has been fixed by v2.0, try it by: npm install vue-template-babel-compiler@latest
改成这样就不报错
报错信息:
[vite-plugin-vue2] /Users/admin/work/code/brick/esop2-support/VueTemplateBabelCompiler: Property key of ObjectMethod expected node to be of a type ["Identifier","StringLiteral","NumericLiteral"] but instead got "MemberExpression"