LoaderImportDependency.js 930 B

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. /** @import { GetConditionFn } from "../Dependency" */
  8. /** @import ModuleGraph from "../ModuleGraph" */
  9. class LoaderImportDependency extends ModuleDependency {
  10. /**
  11. * Creates an instance of LoaderImportDependency.
  12. * @param {string} request request string
  13. */
  14. constructor(request) {
  15. super(request);
  16. /** @type {boolean} */
  17. this.weak = true;
  18. }
  19. get type() {
  20. return "loader import";
  21. }
  22. get category() {
  23. return "loaderImport";
  24. }
  25. /**
  26. * Returns function to determine if the connection is active.
  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;