Skip to content

根据官方 tapable 用法,结合个人思路,试着实现 tapable,源码及注释详解!

Notifications You must be signed in to change notification settings

zhaoyiming0803/tapable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Tapable

Webpack 本质上是一种事件流的机制,它的工作流程就是将各个插件串联起来,而实现这一切的核心就是 Tapable,Tapable 有点类似于 nodejs 的 events 库,核心原理也是依赖于发布订阅模式。

const {
  SyncHook,
  SyncBailHook,
  SyncWaterfallHook,
  SyncLoopHook,
  AsyncParallelHook,
  AsyncParallelBailHook,
  AsyncSeriesHook,
  AsyncSeriesBailHook,
  AsyncSeriesWaterfallHook 
} = require("tapable");

参考:

Tapbal

Promise

About

根据官方 tapable 用法,结合个人思路,试着实现 tapable,源码及注释详解!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published