Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

TryNextPlugin.js 553B

1234567891011121314151617181920
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. module.exports = class TryNextPlugin {
  7. constructor(source, message, target) {
  8. this.source = source;
  9. this.message = message;
  10. this.target = target;
  11. }
  12. apply(resolver) {
  13. const target = resolver.ensureHook(this.target);
  14. resolver.getHook(this.source).tapAsync("TryNextPlugin", (request, resolveContext, callback) => {
  15. resolver.doResolve(target, request, this.message, resolveContext, callback);
  16. });
  17. }
  18. };