Skip to content

Commit

Permalink
chore(performance): prevent duplicate error messages from appearing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLarkInn authored and sokra committed Dec 7, 2016
1 parent 5285f43 commit bf3c41b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 2 additions & 7 deletions lib/performance/EmittedAssetSizeLimitPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ EmittedAssetSizeLimitPlugin.prototype.apply = function(compiler) {
sizeLimit
)
);

if(!hasAsyncChunks) {
warnings.push(new NoAsyncChunksWarning());
}
}
if(entrypointsOverLimit.length > 0) {
warnings.push(
Expand All @@ -85,14 +81,13 @@ EmittedAssetSizeLimitPlugin.prototype.apply = function(compiler) {
entrypointSizeLimit
)
);
}

if(warnings.length > 0) {
if(!hasAsyncChunks) {
warnings.push(new NoAsyncChunksWarning());
}

}

if(warnings.length > 0) {
if(shouldErrorOnHint) {
Array.prototype.push.apply(compilation.errors, warnings);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ This can impact web performance.
Assets:
main.js (303 kB)</CLR>

<CLR=33,BOLD>WARNING in webpack performance recommendations:
You can limit the size of your bundles by using System.import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/</CLR>

<CLR=33,BOLD>WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (250 kB). This can impact web performance.
Entrypoints:
main (303 kB)
Expand Down

0 comments on commit bf3c41b

Please sign in to comment.