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
Playing around with tapable [questions] #71
Comments
The goal of tapable is to compile the callbacks to make their execution monomorphic (and fast). This is why all callbacks must be added before firing the event and cannot be removed (so there is no other compilation).
Being able to identify who added the callback.
Well, it could be but it is not optimal. Tapable is designed to create static hooks. Maybe async iterators would be a better fit for your system. |
Thx you @ooflorent for your answer.
I'm curious about this, does anyone know where this is implemented in this repo?
That's exactly the solution I end with. I rebuilt a very simple cascading async stack to reproduce the expected behavior. |
https://github.com/webpack/tapable/blob/master/lib/HookCodeFactory.js |
Thank you @ooflorent! |
Hello there,
I'm playing around with tapable outside of the Webpack world.
Basically, I'd like to use the async super-powers of tapable to expose hooks from a class method.
Here everything is working perfectly, so questions:
this.hooks[hook].tapPromise(name, promise)
?Thank you a lot
PS: You've done an amazing job with the design of this lib 😍
The text was updated successfully, but these errors were encountered: