DllEntryDependency.js 819 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const Dependency = require("../Dependency");
  7. const makeSerializable = require("../util/makeSerializable");
  8. class DllEntryDependency extends Dependency {
  9. constructor(dependencies, name) {
  10. super();
  11. this.dependencies = dependencies;
  12. this.name = name;
  13. }
  14. get type() {
  15. return "dll entry";
  16. }
  17. serialize(context) {
  18. const { write } = context;
  19. write(this.dependencies);
  20. write(this.name);
  21. super.serialize(context);
  22. }
  23. deserialize(context) {
  24. const { read } = context;
  25. this.dependencies = read();
  26. this.name = read();
  27. super.deserialize(context);
  28. }
  29. }
  30. makeSerializable(
  31. DllEntryDependency,
  32. "webpack/lib/dependencies/DllEntryDependency"
  33. );
  34. module.exports = DllEntryDependency;