You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NextPlugin.js 503B

12345678910111213141516171819
  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 NextPlugin {
  7. constructor(source, target) {
  8. this.source = source;
  9. this.target = target;
  10. }
  11. apply(resolver) {
  12. const target = resolver.ensureHook(this.target);
  13. resolver.getHook(this.source).tapAsync("NextPlugin", (request, resolveContext, callback) => {
  14. resolver.doResolve(target, request, null, resolveContext, callback);
  15. });
  16. }
  17. };