You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
536 B

4 years ago
  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;