Ember auto import & Jquery Plugins?

Good Afternoon Everyone,

My team has a number of jquery plugins that we would like to use in our application.

  • Slimscroll

  • popover

  • tooltip

  • Select2

  • TreeJs

  • Flotcharts

etc…
What is the way one goes about incorporating these plugins into a project in Ember with the jquery integration enabled as detailed here? I was under the impression ember-auto-import performs some magic to make this painless.

I should note we are also using Apex Charts , for which ember-auto-import does indeed work its magic.

Also in case it’s relevant we are using ember-cli-typescript.

I’m not sure if this is the best way but you can always import stuff like that in your ember-cli-build.js e.g. from our app:

  ...
  app.import('node_modules/jquery-ui/ui/core.js');
  app.import('node_modules/jquery-ui/ui/widget.js');
  app.import('node_modules/jquery-ui/ui/mouse.js');
  app.import('node_modules/jquery-ui/ui/resizable.js');
  app.import('node_modules/jquery-ui/ui/slider.js');
  app.import('node_modules/jquery-ui/ui/sortable.js');
  ...

I generally use ember-auto-import for more modern modules or anything i want to load lazily.

1 Like

This is an ember-auto-import FAQ:

1 Like

Indeed a couple hours after posting the question I came across the bit about jquery plugins in your link.

Thank you all.