LoaderImportDependency.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 LoaderImportDependency extends ModuleDependency {
  13. /**
  14. * @param {string} request request string
  15. */
  16. constructor(request) {
  17. super(request);
  18. this.weak = true;
  19. }
  20. get type() {
  21. return "loader import";
  22. }
  23. get category() {
  24. return "loaderImport";
  25. }
  26. /**
  27. * @param {ModuleGraph} moduleGraph module graph
  28. * @returns {null | false | GetConditionFn} function to determine if the connection is active
  29. */
  30. getCondition(moduleGraph) {
  31. return false;
  32. }
  33. }
  34. module.exports = LoaderImportDependency;