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.

23 lines
489 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 MultiModule = require("./MultiModule");
  8. module.exports = class MultiModuleFactory 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 MultiModule(data.context, dependency.dependencies, dependency.name)
  18. );
  19. }
  20. };