tapAfterEnvironmentToPatchWatching.js 682 B

12345678910111213
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const InclusiveNodeWatchFileSystem_1 = require("../watch/InclusiveNodeWatchFileSystem");
  4. function tapAfterEnvironmentToPatchWatching(compiler, state) {
  5. compiler.hooks.afterEnvironment.tap('ForkTsCheckerWebpackPlugin', () => {
  6. const watchFileSystem = compiler.watchFileSystem;
  7. if (watchFileSystem) {
  8. // wrap original watch file system
  9. compiler.watchFileSystem = new InclusiveNodeWatchFileSystem_1.InclusiveNodeWatchFileSystem(watchFileSystem, compiler, state);
  10. }
  11. });
  12. }
  13. exports.tapAfterEnvironmentToPatchWatching = tapAfterEnvironmentToPatchWatching;