what is tapable

Webpack architecture is heavily based on events. Each webpack plugin is basically a set of listeners hooked on different events during compilation phases(编译阶段). Under the hood, webpack uses a library called tapable to encapsulate(封装) “publish-subscribe” implementation.

资料

  1. Under the hood webpack: core library behind the event-driven architecture
  2. What the Hook? Learn the basics of Tapable
  3. WebPack 如何控制事件执行流 | webpack 系列之二 Tapable
  4. tapable 在 webpak 主流程中的应用