SelfModuleFactory.js 384 B

123456789101112131415161718192021
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. class SelfModuleFactory {
  7. constructor(moduleGraph) {
  8. this.moduleGraph = moduleGraph;
  9. }
  10. create(data, callback) {
  11. const module = this.moduleGraph.getParentModule(data.dependencies[0]);
  12. callback(null, {
  13. module
  14. });
  15. }
  16. }
  17. module.exports = SelfModuleFactory;