Skip to content

Commit 1556a44

Browse files
author
Pavithra K
committed
Adds introduction in plugins api
1 parent ad1d2c9 commit 1556a44

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

content/concepts/plugins.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ They also serve the purpose of doing **anything else** that a [loader](/concepts
1414

1515
A webpack **plugin** is a JavaScript object that has an `apply` property. This `apply` property is called by the webpack compiler, giving access to the **entire** compilation lifecycle.
1616

17-
1817
**ConsoleLogOnBuildWebpackPlugin.js**
1918

2019
```javascript

content/pluginsapi/index.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ title: Plugins API
33
sort: 1
44
---
55

6+
webpack provides flexible and powerful customization api in the form of plugins. Using plugins, we can plug functionality into webpack. Additionaly, webpack provides lifecycle hooks into which plugins can be registered. At each of these lifecycle points, webpack will run all of the registered plugins and provide them with the current state of the webpack compilation.
7+
68
## Tapable & Tapable instances
7-
**Tapable Instances** are classes in the webpack source code which have been extended or mixed in from class `Tapable`.
9+
10+
The plugin architecture is mainly possible for webpack due to an internal library named `Tapable`.
11+
**Tapable Instances** are classes in the webpack source code which have been extended or mixed in from class `Tapable`.
12+
13+
For plugin authors, it is important to know which are the `Tapable` instances in the webpack source code. These instances provide a variety of event hooks into which custom plugins can be attached.
14+
Hence, throughout this section are a list of all of the webpack `Tapable` instances (and their event hooks), which plugin authors can utilize.
15+
816
For more information on `Tapable` visit the [tapable repository](https://github.com/webpack/tapable) or visit the [complete overview](./tapable)
917

10-
Throughout this section are a list of all of the webpack Tapable instances (and their event hooks), which plugin authors can utilize.
18+
## Creating a Plugin
19+
1120

12-
## Creating a Plugins
1321

1422
### Different Plugin Shapes

0 commit comments

Comments
 (0)