Selaa lähdekoodia

Video 10: plugins introduction.

Frederic G. MARAND 4 vuotta sitten
vanhempi
säilyke
fb193e4775
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  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;