ModuleHotAcceptDependency.js 778 B

1234567891011121314151617181920212223242526272829303132333435
  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 ModuleDependencyTemplateAsId = require("./ModuleDependencyTemplateAsId");
  9. class ModuleHotAcceptDependency extends ModuleDependency {
  10. constructor(request, range) {
  11. super(request);
  12. this.range = range;
  13. this.weak = true;
  14. }
  15. get type() {
  16. return "module.hot.accept";
  17. }
  18. get category() {
  19. return "commonjs";
  20. }
  21. }
  22. makeSerializable(
  23. ModuleHotAcceptDependency,
  24. "webpack/lib/dependencies/ModuleHotAcceptDependency"
  25. );
  26. ModuleHotAcceptDependency.Template = ModuleDependencyTemplateAsId;
  27. module.exports = ModuleHotAcceptDependency;