diff --git a/src/content/contribute/writing-a-plugin.md b/src/content/contribute/writing-a-plugin.md index a3d6a22fa8dc..3f675f689b4f 100644 --- a/src/content/contribute/writing-a-plugin.md +++ b/src/content/contribute/writing-a-plugin.md @@ -5,6 +5,7 @@ contributors: - tbroadley - iamakulov - byzyk + - franjohn21 --- Plugins expose the full potential of the webpack engine to third-party developers. Using staged build callbacks, developers can introduce their own behaviors into the webpack build process. Building plugins is a bit more advanced than building loaders, because you'll need to understand some of the webpack low-level internals to hook into them. Be prepared to read some source code! @@ -23,7 +24,7 @@ class MyExampleWebpackPlugin { apply(compiler) { // Specify the event hook to attach to compiler.hooks.compile.tapAsync( - 'afterCompile', + 'MyExampleWebpackPlugin', (compilation, callback) => { console.log('This is an example plugin!'); console.log('Here’s the `compilation` object which represents a single build of assets:', compilation);