-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何添加 reflect-metadata 支持? #3132
Labels
enhancement
New feature or request
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
这部分我个人觉得暂时是没有办法配置的,编译工作大部分都是由 Taro CLI 自己管理的,暂不开放给开发者配置。仔细读文档也会发现只有 H5 会允许自定义部分 Webpack 配置,而小程序则几乎没有。 Babel 6 的问题需要等官方更新。 |
同问,想使用装饰器但是引入reflect-metadata无效,还是会Reflect.hasOwnMetadata不存在 |
liaoyinglong
added a commit
to liaoyinglong/taro
that referenced
this issue
Mar 28, 2020
20 tasks
luckyadam
pushed a commit
that referenced
this issue
Mar 29, 2020
加了
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
观察发现编译
*.ts
并没有采用 typescript 自带的 tsc 编译,似乎是使用的 babel 编译的babel 要实现
reflect-matadata
需要使用babel-plugin-transform-typescript-metadata
这个插件,这个插件是基于
@babel/core: ^7
,但是现在 taro 是使用的babel-core: 6.26.3
, 完全没法用现在发现 taro 本身也有通过typescript编译的: plugin-typescript,
不知道在哪里配置
想知道可以通过什么方式实现
The text was updated successfully, but these errors were encountered: