chore(performance): prevent duplicate error messages from appearing

This commit is contained in:
Sean Larkin 2016-12-05 09:17:20 -06:00 committed by Tobias Koppers
parent 41530a1adc
commit e7c2aa624b
2 changed files with 2 additions and 11 deletions

View File

@ -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 {

View File

@ -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)