main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
955 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | Author Tobias Koppers @sokra
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | "use strict";
|
---|
| 7 |
|
---|
| 8 | const SizeFormatHelpers = require("../SizeFormatHelpers");
|
---|
| 9 | const WebpackError = require("../WebpackError");
|
---|
| 10 |
|
---|
| 11 | class MinMaxSizeWarning extends WebpackError {
|
---|
| 12 | /**
|
---|
| 13 | * @param {string[] | undefined} keys keys
|
---|
| 14 | * @param {number} minSize minimum size
|
---|
| 15 | * @param {number} maxSize maximum size
|
---|
| 16 | */
|
---|
| 17 | constructor(keys, minSize, maxSize) {
|
---|
| 18 | let keysMessage = "Fallback cache group";
|
---|
| 19 | if (keys) {
|
---|
| 20 | keysMessage =
|
---|
| 21 | keys.length > 1
|
---|
| 22 | ? `Cache groups ${keys.sort().join(", ")}`
|
---|
| 23 | : `Cache group ${keys[0]}`;
|
---|
| 24 | }
|
---|
| 25 | super(
|
---|
| 26 | "SplitChunksPlugin\n" +
|
---|
| 27 | `${keysMessage}\n` +
|
---|
| 28 | `Configured minSize (${SizeFormatHelpers.formatSize(minSize)}) is ` +
|
---|
| 29 | `bigger than maxSize (${SizeFormatHelpers.formatSize(maxSize)}).\n` +
|
---|
| 30 | "This seem to be a invalid optimization.splitChunks configuration."
|
---|
| 31 | );
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | module.exports = MinMaxSizeWarning;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.