AMDRequireItemDependency.js 943 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 makeSerializable = require("../util/makeSerializable");
  7. const ModuleDependency = require("./ModuleDependency");
  8. const ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsRequireId");
  9. /** @typedef {import("../javascript/JavascriptParser").Range} Range */
  10. class AMDRequireItemDependency extends ModuleDependency {
  11. /**
  12. * @param {string} request the request string
  13. * @param {Range=} range location in source code
  14. */
  15. constructor(request, range) {
  16. super(request);
  17. this.range = range;
  18. }
  19. get type() {
  20. return "amd require";
  21. }
  22. get category() {
  23. return "amd";
  24. }
  25. }
  26. makeSerializable(
  27. AMDRequireItemDependency,
  28. "webpack/lib/dependencies/AMDRequireItemDependency"
  29. );
  30. AMDRequireItemDependency.Template = ModuleDependencyTemplateAsRequireId;
  31. module.exports = AMDRequireItemDependency;