mirror of https://github.com/webpack/webpack.git
chore(performance): prevent duplicate error messages from appearing
This commit is contained in:
parent
41530a1adc
commit
e7c2aa624b
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue