Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jquery #2

Open
Floriferous opened this issue Dec 18, 2018 · 3 comments
Open

Remove jquery #2

Floriferous opened this issue Dec 18, 2018 · 3 comments

Comments

@Floriferous
Copy link

I can't find the place where this package actually uses jquery? Yet it still requires it.

Would be great to remove it, and probably also check other unused packages and remove those that are no longer needed.

@DeanKamali
Copy link

I'm unable to upgrade jquery to latest version because amplify package used under the hood is using [email protected]

Any ideas about how how I can upgrade jquery to the latest version?

@evolross
Copy link

evolross commented Feb 21, 2020

Good question. Simply add the latest Meteor jquery package by doing meteor add [email protected]! with an exclamation point at the end.

The latest Meteor [email protected] is set to simply reference whatever version you installed via NPM by doing a meteor npm install --save [email protected] instead of wrapping the actual jQuery release. So this lets you install whatever version you want via NPM. I wish the Meteor underscore package did this as well. All this was done so Meteor builds would no longer ship two versions of jQuery which they previously did if you added/needed it in both places (for Meteor and NPM package dependencies).

The ! exclamation point is a new-ish modifier you can add to Meteor packages that simply tells any other Meteor package that relies on that Meteor package to weaken it's dependency and use that version - which in turn uses your NPM installed version. Nifty right?

I'm running meteor-persistent-session on NPM [email protected] and it's working great - along with every other non-modernized Meteor package that uses old jquery like autoform, i18n, etc. Do a meteor list --tree to see what Meteor packages depend on jquery in your app. All of these will use the NPM version after doing the meteor add [email protected]!

@DeanKamali
Copy link

@evolross the ! exclamation point did the trick, thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants