DllModuleFactory.js 536 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const { Tapable } = require("tapable");
  7. const DllModule = require("./DllModule");
  8. class DllModuleFactory extends Tapable {
  9. constructor() {
  10. super();
  11. this.hooks = {};
  12. }
  13. create(data, callback) {
  14. const dependency = data.dependencies[0];
  15. callback(
  16. null,
  17. new DllModule(
  18. data.context,
  19. dependency.dependencies,
  20. dependency.name,
  21. dependency.type
  22. )
  23. );
  24. }
  25. }
  26. module.exports = DllModuleFactory;