DllModuleFactory.js 478B

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