Ember Octane and JQuery

Viewed 471

For the past few weeks i've been playing with ember octane which in my opinion is awesome. I've tried a few ember plugins in order to test which plugins are working currently with ember octane, some of them require jQuery to work. So my question is: if it's possible to add jQuery to ember octane to make those plugins work?

2 Answers

Haven't tested it myself but it should be as easy as:

  • Add @ember/jquery package as a dev dependency.
  • Enable optional feature jquery-integration.

An optional feature could be enabled using Ember CLI by running ember feature:enable some-feature or by editing config/optional-features.json manually. You could find more information about optional features in Guides.

One thing to note from @jelhan's answer is that adding @ember/jquery will only allow you to use JQuery internally. It will not allow Ember addons to use JQuery. For the ember addons to use JQuery, you would need to request that the addon add @ember/jquery to their dependencies.

Related