diff --git a/lib/performance/EmittedAssetSizeLimitPlugin.js b/lib/performance/EmittedAssetSizeLimitPlugin.js index cd817e180..9645c15fe 100644 --- a/lib/performance/EmittedAssetSizeLimitPlugin.js +++ b/lib/performance/EmittedAssetSizeLimitPlugin.js @@ -72,10 +72,6 @@ EmittedAssetSizeLimitPlugin.prototype.apply = function(compiler) { sizeLimit ) ); - - if(!hasAsyncChunks) { - warnings.push(new NoAsyncChunksWarning()); - } } if(entrypointsOverLimit.length > 0) { warnings.push( @@ -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 { diff --git a/test/statsCases/performance-no-async-chunks-shown/expected.txt b/test/statsCases/performance-no-async-chunks-shown/expected.txt index 543d64d3f..11c2c5ff9 100644 --- a/test/statsCases/performance-no-async-chunks-shown/expected.txt +++ b/test/statsCases/performance-no-async-chunks-shown/expected.txt @@ -11,10 +11,6 @@ This can impact web performance. Assets: main.js (303 kB) -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/ - 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)