You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`apply(…pluginInstances: (AnyPlugin|function)[])` - `AnyPlugin`should be subclass of [AbstractPlugin](https://github.com/webpack/webpack/blob/master/lib/AbstractPlugin.js), or a class (or object, rare case) has an `apply`method, or just a function with some registration code inside.
20
-
This method is just to **apply**plugins' definition, so that the real event listeners can be registered into the **Tapable instance**'s registry.
The different `applyPlugins*`methods cover the following use cases:
27
+
不同的 `applyPlugins*`方法对应以下使用情况:
28
28
29
-
*Plugins can run serially
29
+
*串行执行插件
30
30
31
-
*Plugins can run in parallel
31
+
*并行执行插件
32
32
33
-
*Plugins can run one after the other but taking input from the previous plugin (waterfall)
33
+
*插件一个接一个的执行,并且每个插件接收上一个插件的返回值(瀑布)
34
34
35
-
*Plugins can run asynchronously
35
+
*异步执行插件
36
36
37
-
*Quit runing plugins on bail: that is once one plugin returns non-`undefined`, jump out of the run flow and return *the return of that plugin*. This sounds like `once()` of `EventEmitter` but is totally different.
One of webpack's **Tapable instances**, [Compiler](./compiler), is responsible for compiling the webpack configuration object and returning a [Compilation](./compilation) instance. When the Compilation instance runs, it creates the required bundles.
0 commit comments