Skip to content
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

本地plugin优化支持typescript #12557

Closed
zsytssk opened this issue Sep 22, 2022 · 1 comment
Closed

本地plugin优化支持typescript #12557

zsytssk opened this issue Sep 22, 2022 · 1 comment
Labels
enhancement New feature or request to be closed

Comments

@zsytssk
Copy link

zsytssk commented Sep 22, 2022

这个特性解决了什么问题?

可以更舒服的写本地插件

这个 API 长什么样?

现在我使用本地插件,插件源文件是支持typescript的, 但是源文件引入的其他文件就不支持,只要使用ts语法就会报错。

eg.

  • 插件本地源文件 xxx/localPlugin.ts, 在config/index.js中使用绝对路径引用,localPlugin.ts支持所有的ts语法
  • localPlugin.ts中import引入localOther.ts,localOther无法使用任何的ts语法,export, type...
@taro-bot2 taro-bot2 bot added the enhancement New feature or request label Sep 22, 2022
@zsytssk zsytssk changed the title 本地plugin优化支持typesript 本地plugin优化支持typescript Sep 22, 2022
@ZakaryCode
Copy link
Contributor

插件还是使用编译后的比较好一些,更通用且使用效率会更高,在加载插件时还需要编译插件会降低开发效率,优化意义不足。

插件编译可以参考项目内 rollup 配置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to be closed
Projects
None yet
Development

No branches or pull requests

2 participants