LoaderDependency.js 972 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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("../ModuleGraph")} ModuleGraph */
  8. /** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
  9. /** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */
  10. /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
  11. class LoaderDependency extends ModuleDependency {
  12. /**
  13. * @param {string} request request string
  14. */
  15. constructor(request) {
  16. super(request);
  17. }
  18. get type() {
  19. return "loader";
  20. }
  21. get category() {
  22. return "loader";
  23. }
  24. /**
  25. * @param {ModuleGraph} moduleGraph module graph
  26. * @returns {null | false | function(ModuleGraphConnection, RuntimeSpec): ConnectionState} function to determine if the connection is active
  27. */
  28. getCondition(moduleGraph) {
  29. return false;
  30. }
  31. }
  32. module.exports = LoaderDependency;