Browse Source

Video 10: plugins introduction.

Frederic G. MARAND 4 years ago
parent
commit
fb193e4775
1 changed files with 10 additions and 0 deletions
  1. 10 0
      ExamplePlugin.js

+ 10 - 0
ExamplePlugin.js

@@ -0,0 +1,10 @@
+class ExamplePlugin {
+  apply(compiler) {
+    compiler.plugin("run", (compiler, callback) => {
+      console.log("Webpack is running our plugin");
+      callback();
+    });
+  }
+}
+
+module.exports = ExamplePlugin;