- Notifications
You must be signed in to change notification settings - Fork476
Core: Support the jQuery slim build#346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
While it'd be hard for Migrate to support all the possible jQuery builds,the slim build is special as it's officially maintained by the jQuery team,published to npm & uploaded to CDNs.This commit adds support for the jQuery slim build in jQuery 3.0.0 & newer.The slim build is now tested next to the regular one.Fixesjquery#345
Note that this currently doesn't pass slim builds with jQuery master because apparently the This issue shouldn't block us from landing this PR, though - slim tests are isolated so it's easy to see the regular ones worked. Also, jQuery 4.x is not out yet and all tests pass with both full & slim builds for all tested jQuery 3.x builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Seems pretty straightforward. I wonder how commonly the slim build is used?
@dmethvin It's hard to tell, especially that 3.x itself is still way less popular than 1.x/2.x. But I've seen enough people trying it in various places on GitHub, including it in bug reports, etc. that I think it may be more popular than we'd think! Many projects already include a Promise polyfill & they have their own AJAX library, the slim build makes a lot of sense then. |
The `show()`, `hide()` & `toggle()` methods were included in the 3.x jQueryslim build. The jQuery master build accidentally started to exclude them asthey were only imported in the effects module and the new Rollup-based buildsystem follows the module dependency graph when excluding modules.To resolve the issue, import the `css/showHide.js` file directly in the main`jquery.js` file.Closesgh-4704Refjquery/jquery-migrate#346
While it'd be hard for Migrate to support all the possible jQuery builds,
the slim build is special as it's officially maintained by the jQuery team,
published to npm & uploaded to CDNs.
This commit adds support for the jQuery slim build in jQuery 3.0.0 & newer.
The slim build is now tested next to the regular one.
Fixes#345