LoaderDependency.js 997 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const ModuleDependency = require("./ModuleDependency");
  7. /** @typedef {import("../Dependency").GetConditionFn} GetConditionFn */
  8. /** @typedef {import("../ModuleGraph")} ModuleGraph */
  9. /** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
  10. /** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */
  11. /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
  12. class LoaderDependency extends ModuleDependency {
  13. /**
  14. * @param {string} request request string
  15. */
  16. constructor(request) {
  17. super(request);
  18. }
  19. get type() {
  20. return "loader";
  21. }
  22. get category() {
  23. return "loader";
  24. }
  25. /**
  26. * @param {ModuleGraph} moduleGraph module graph
  27. * @returns {null | false | GetConditionFn} function to determine if the connection is active
  28. */
  29. getCondition(moduleGraph) {
  30. return false;
  31. }
  32. }
  33. module.exports = LoaderDependency;