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