瀏覽代碼

Video 10: plugins introduction.

Frederic G. MARAND 4 年之前
父節點
當前提交
fb193e4775
共有 1 個文件被更改,包括 10 次插入0 次删除
  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;