Explorar o código

Video 10: plugins introduction.

Frederic G. MARAND %!s(int64=4) %!d(string=hai) anos
pai
achega
fb193e4775
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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;