|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
963 bytes
|
| Line | |
|---|
| 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 WebpackError = require("../errors/WebpackError");
|
|---|
| 9 | const formatSize = require("../util/formatSize");
|
|---|
| 10 |
|
|---|
| 11 | class MinMaxSizeWarning extends WebpackError {
|
|---|
| 12 | /**
|
|---|
| 13 | * Creates an instance of MinMaxSizeWarning.
|
|---|
| 14 | * @param {string[] | undefined} keys keys
|
|---|
| 15 | * @param {number} minSize minimum size
|
|---|
| 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;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.