Parcourir la source

Video 10: plugins introduction.

Frederic G. MARAND il y a 4 ans
Parent
commit
fb193e4775
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  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;