* Creates an instance of MinMaxSizeWarning. * @param {string[] | undefined} keys keys * @param {number} minSize minimum size * @param {number} maxSize maximum size
(keys, minSize, maxSize)
| 16 | * @param {number} maxSize maximum size |
| 17 | */ |
| 18 | constructor(keys, minSize, maxSize) { |
| 19 | let keysMessage = "Fallback cache group"; |
| 20 | if (keys) { |
| 21 | keysMessage = |
| 22 | keys.length > 1 |
| 23 | ? `Cache groups ${keys.sort().join(", ")}` |
| 24 | : `Cache group ${keys[0]}`; |
| 25 | } |
| 26 | super( |
| 27 | "SplitChunksPlugin\n" + |
| 28 | `${keysMessage}\n` + |
| 29 | `Configured minSize (${formatSize(minSize)}) is ` + |
| 30 | `bigger than maxSize (${formatSize(maxSize)}).\n` + |
| 31 | "This seem to be a invalid optimization.splitChunks configuration." |
| 32 | ); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | module.exports = MinMaxSizeWarning; |
nothing calls this directly
no test coverage detected