You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11,6 +11,21 @@ function EmittedAssetSizeLimitPlugin(performanceOptions) {
11
11
12
12
module.exports=EmittedAssetSizeLimitPlugin;
13
13
14
+
functionuniques(array){
15
+
varresult=[],
16
+
val,ridx;
17
+
outer:
18
+
for(vari=0,length=array.length;i<length;i++){
19
+
val=array[i];
20
+
ridx=result.length;
21
+
while(ridx--){
22
+
if(val===result[ridx])continue outer;
23
+
}
24
+
result.push(val);
25
+
}
26
+
returnresult;
27
+
}
28
+
14
29
functionnormalizeAndCompare(sizeLimit,assetSize){
15
30
// sizeLimit=maxAssetSize is always expressed in kB
16
31
// assetSize is expressed in byte size
@@ -24,7 +39,7 @@ function getJSWarnings(noOfAssets, sizeLimit, assetSize) {
24
39
if(noOfAssets===1){
25
40
warnings.push(newError("EmmittedAssetSizeWarning: "+"This asset exceeds "+sizeLimit+"kB. Consider reducing the size for optimal web performance."));
26
41
}else{
27
-
warnings.push(newError("EmmittedAssetSizeWarning: "+"Highlighted chunks are large and are likely to impact web performance. Consider keeping total chunks of page < "+sizeLimit+"kB"));
42
+
warnings.push(newError("EmmittedAssetSizeWarning: "+"Highlighted chunks are large and are likely to impact web performance. Consider keeping total chunks of page < "+sizeLimit+"kB"));
0 commit comments