插件 API 貌似没有支持 onExit #12942
Unanswered
mortalYoung
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我现在有一个大概如下代码的插件:
上述代码的核心是创建一个单例的实例,然后做一些 CPU 密集型的事情,期望是后续需要在某个时机去销毁这个实例。
如果是正常编译的话,应该是可以在
api. onBuildComplete
或者api. onDevCompileDone
的情况下可以销毁实例(不确定是否可以,理论上貌似可以)。在非正常退出的情况下,也期望是可以销毁,目前期望是
api.onExit
之类的方法,但是目前没看到。Beta Was this translation helpful? Give feedback.
All reactions