HarmonyAcceptImportDependency.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 HarmonyImportDependency = require("./HarmonyImportDependency");
  8. const NullDependency = require("./NullDependency");
  9. /** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
  10. /** @typedef {import("../Dependency")} Dependency */
  11. /** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
  12. class HarmonyAcceptImportDependency extends HarmonyImportDependency {
  13. /**
  14. * @param {string} request the request string
  15. */
  16. constructor(request) {
  17. super(request, NaN);
  18. this.weak = true;
  19. }
  20. get type() {
  21. return "harmony accept";
  22. }
  23. }
  24. makeSerializable(
  25. HarmonyAcceptImportDependency,
  26. "webpack/lib/dependencies/HarmonyAcceptImportDependency"
  27. );
  28. HarmonyAcceptImportDependency.Template =
  29. /** @type {typeof HarmonyImportDependency.Template} */ (
  30. NullDependency.Template
  31. );
  32. module.exports = HarmonyAcceptImportDependency;