ImportMetaHotAcceptDependency.js 805 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Ivan Kopeykin @vankop
  4. */
  5. "use strict";
  6. const makeSerializable = require("../util/makeSerializable");
  7. const ModuleDependency = require("./ModuleDependency");
  8. const ModuleDependencyTemplateAsId = require("./ModuleDependencyTemplateAsId");
  9. class ImportMetaHotAcceptDependency extends ModuleDependency {
  10. constructor(request, range) {
  11. super(request);
  12. this.range = range;
  13. this.weak = true;
  14. }
  15. get type() {
  16. return "import.meta.webpackHot.accept";
  17. }
  18. get category() {
  19. return "esm";
  20. }
  21. }
  22. makeSerializable(
  23. ImportMetaHotAcceptDependency,
  24. "webpack/lib/dependencies/ImportMetaHotAcceptDependency"
  25. );
  26. ImportMetaHotAcceptDependency.Template = ModuleDependencyTemplateAsId;
  27. module.exports = ImportMetaHotAcceptDependency;