Reputation: 478
I don't need jquery in my meteor app. When I type meteor remove jquery, answer is jquery: not in project. But jquery is still attached in html.
Upvotes: 4
Views: 3513
Reputation: 631
This is how I remove jQuery from Meteor.
Make sure your code really doesn't depend on jQuery before doing this. Also adding any Meteor packages depending on jQuery won't work as expected anymore (e.g: materialize:materialize).
So, if you want to make sure jQuery is removed from Meteor no matter what, just put
Package.describe({
summary: "Remove jQuery from meteor",
name: "jquery",
version: '1.999.999',
});
into packages/jquery/package.js
. No need to clone. No need to add any other files.
Check your .meteor/versions
file for the entry:
[email protected]
to confirm it worked.
Upvotes: 1
Reputation: 13645
To remove/replace jQuery with another version (2.x or 3.x).
Clone jquery package from official sources into your project folder /packages
.
Replace contents of jquery.js
with anything.
Downloaded package will have a higher priority and will be used instead of original one. Do on your own risk.
Upvotes: 1
Reputation: 4112
Meteor internals (domutils) depends on JQuery, but I believe the plan is to remove that dependency at some stage:
See: https://groups.google.com/forum/?fromgroups=#!topic/meteor-talk/21y9NbM9v90
Domutils seems to be able to cope without jQuery if sizzle is present (see findAllBySelector). Doing a quick scan of the code I didn't see any other uses (other than on the server side - in the less parser).
Upvotes: 1