Core: Exclude callbacks & deferred modules in the slim build as well

So far, the slim build only excluded ajax & effects modules. As many web apps
right now rely on native Promises, often with a polyfill for legacy browsers,
deferred & callbacks modules are not that useful for sites that already exclude
ajax & effects modules.

This decreases the gzipped minified size of the slim module by 1760 bytes,
to 19706 bytes (below 20k!).

Closes gh-4553
This commit is contained in:
Michał Gołębiowski-Owczarek 2020-01-20 18:58:23 +01:00 committed by GitHub
parent ff2819911d
commit fbc44f52fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,7 +306,7 @@ module.exports = function( grunt ) {
// the official slim build // the official slim build
.reduce( ( acc, elem ) => acc.concat( .reduce( ( acc, elem ) => acc.concat(
elem === "slim" ? elem === "slim" ?
[ "-ajax", "-effects" ] : [ "-ajax", "-callbacks", "-deferred", "-effects" ] :
[ elem ] [ elem ]
), [] ) ), [] )