How can I include jQueryUI in my modular backbone.js app using RequireJS?

后端 未结 4 1808
迷失自我
迷失自我 2020-12-09 19:05

I want to include jQueryUI in my backbone.js app using RequireJS. The main.js file included in my index.html is as follows:

require.config({
    paths: {
            


        
4条回答
  •  天命终不由人
    2020-12-09 19:20

    The other answers are a bit outdated now. JQuery UI comes with AMD support. If you want the whole project just use bower install jquery-ui and then add it to paths. No shim needed.

    If you want to load a subset of jQuery UI that you need in your app (while not loading extra bloat) then just use bower install jquery-ui to get the whole thing then use RequireJS build tool called r.js to create an AMD package of exactly the files you need.

提交回复
热议问题