LoaderImportDependency.js 928 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. 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. this.weak = true;
  17. }
  18. get type() {
  19. return "loader import";
  20. }
  21. get category() {
  22. return "loaderImport";
  23. }
  24. /**
  25. * Returns function to determine if the connection is active.
  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 = LoaderImportDependency;