소스 검색

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;