From 652f4c06fcf15b9d369f0e8ec53b4de2df918460 Mon Sep 17 00:00:00 2001 From: Francis John Date: Thu, 6 Sep 2018 15:01:57 -0700 Subject: [PATCH] Use consistent plugin name in code snippet --- src/content/contribute/writing-a-plugin.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);