|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 3 | Author Sean Larkin @thelarkinn
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | "use strict";
|
|---|
| 7 |
|
|---|
| 8 | const WebpackError = require("./WebpackError");
|
|---|
| 9 |
|
|---|
| 10 | /** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
|
|---|
| 11 | /** @typedef {import("../Module")} Module */
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Error raised when webpack detects an attempt to lazy-load a chunk name that
|
|---|
| 15 | * is already claimed by an entrypoint's initial chunk.
|
|---|
| 16 | */
|
|---|
| 17 | class AsyncDependencyToInitialChunkError extends WebpackError {
|
|---|
| 18 | /**
|
|---|
| 19 | * Captures the chunk name, originating module, and source location for an
|
|---|
| 20 | * invalid async dependency targeting an initial chunk.
|
|---|
| 21 | * @param {string} chunkName Name of Chunk
|
|---|
| 22 | * @param {Module} module module tied to dependency
|
|---|
| 23 | * @param {DependencyLocation} loc location of dependency
|
|---|
| 24 | */
|
|---|
| 25 | constructor(chunkName, module, loc) {
|
|---|
| 26 | super(
|
|---|
| 27 | `It's not allowed to load an initial chunk on demand. The chunk name "${chunkName}" is already used by an entrypoint.`
|
|---|
| 28 | );
|
|---|
| 29 |
|
|---|
| 30 | /** @type {string} */
|
|---|
| 31 | this.name = "AsyncDependencyToInitialChunkError";
|
|---|
| 32 | /** @type {Module} */
|
|---|
| 33 | this.module = module;
|
|---|
| 34 | /** @type {DependencyLocation} */
|
|---|
| 35 | this.loc = loc;
|
|---|
| 36 | }
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | module.exports = AsyncDependencyToInitialChunkError;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.