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.

31 lines
871 B

4 years ago
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Sean Larkin @thelarkinn
  4. */
  5. "use strict";
  6. const WebpackError = require("./WebpackError");
  7. /** @typedef {import("./Module")} Module */
  8. class AsyncDependencyToInitialChunkError extends WebpackError {
  9. /**
  10. * Creates an instance of AsyncDependencyToInitialChunkError.
  11. * @param {string} chunkName Name of Chunk
  12. * @param {Module} module module tied to dependency
  13. * @param {TODO} loc location of dependency
  14. */
  15. constructor(chunkName, module, loc) {
  16. super(
  17. `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.`
  18. );
  19. this.name = "AsyncDependencyToInitialChunkError";
  20. this.module = module;
  21. this.loc = loc;
  22. Error.captureStackTrace(this, this.constructor);
  23. }
  24. }
  25. module.exports = AsyncDependencyToInitialChunkError;