I'm using npm, TypeScript and Webpack.
I can use Expose Loader to expose jQuery globally:
import "expose-loader?$!jquery"
import "expose-loader?jQuery!jquery"
Then I can import bootstrap:
import "bootstrap"
And this allows $, jQuery, and $().popover(a boostrap function in the jQuery namespace) to be visible globally to external js files or the browser console.
However, I can't find a way to expose $.ui in the same manner.
I've tried:
import "jquery-ui" //needs building, from 1.12 on they support importing indivisual modules
import "jquery-ui/ui"
import "jquery-ui-dist/jquery-ui.js"
import "jquery-ui-bundle" //1.12.1 and 1.11.4
import "jqueryui";
All in an effort to get import "jquery-ui-touch-punch" to eventually import without throwing errors...
$to work.$().popoverand get undefined, import bootstrap and get the popover function printed out, and then type$.uiI get undefined. If I just import the jQuery and jQuery-ui scripts normally with script tags then$.uiprints out it's version. ¯_(ツ)_/¯$.uiobject whichjquery-ui-touch-punchcalls in it's setup. The other answers are just different packages which I've tried already. doing someimportvsrequiretesting and more older version tests now.webpack-jquery-uiwhich is supposed to be a bundle of bothjqueryandjquery-uialso doesn't work.$().popoverwas available within the scope of my bundle, but jQuery-ui's$.uihasn't been available with any combination.