ImportDependenciesBlock.js 614 B

123456789101112131415161718
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
  7. const ImportDependency = require("./ImportDependency");
  8. module.exports = class ImportDependenciesBlock extends AsyncDependenciesBlock {
  9. // TODO webpack 5 reorganize arguments
  10. constructor(request, range, groupOptions, module, loc, originModule) {
  11. super(groupOptions, module, loc, request);
  12. this.range = range;
  13. const dep = new ImportDependency(request, originModule, this);
  14. dep.loc = loc;
  15. this.addDependency(dep);
  16. }
  17. };