]> source.dussan.org Git - jquery.git/commitdiff
Core: Exclude callbacks & deferred modules in the slim build as well
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 20 Jan 2020 17:58:23 +0000 (18:58 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Jan 2020 17:58:23 +0000 (18:58 +0100)
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

build/tasks/build.js

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