Right now, when doing a special jquery build, you must always include the selector module, no matter what the build is:
"
Any module may be excluded except for
core
, and
selector
. To exclude a module, pass its path relative to the
src
folder (without the
.js
extension)."
There seems to be a common desire out there to only use the ajax part of the jquery library:
Right now, this is semi possible, if you build jquery with the ajax, ajax/xhr, ajax/script, and ajax/jsonp modules. However, even if you choose these modules only, you still must include the selector module, despite it not being used in any of these modules (except jquery.load, which could be excluded).
If you use something like react, it can essentially remove the need for jquery selectors, but you still need ajax functionality from a third party library - an ajax-only jquery without any selectors would be ideal.
If you include the jquery sizzle selectors, this is an about 18kb minified, and has to be processed by mobile devices, resulting in a performance hit on mobile, in particular on slower devices with a slower connection.
The grunt command could look like: