Quellcode durchsuchen

Video 10: plugins introduction.

Frederic G. MARAND vor 4 Jahren
Ursprung
Commit
fb193e4775
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  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;