I\'m writing a Node JS application where I need both jQuery UI and jQuery Mobile. I\'m using Browserify to pack the modules in a single js file.
I have the following
Here is a simple runnable demo using browserify-shim and jquery + jquery mobile: https://gist.github.com/mchelen/a8c5649da6bb50816f7e
The most important lines are:
package.json
"browserify-shim": {
"jquery": "$",
"jquery-mobile" : { "exports": "$.mobile", "depends": [ "jquery:$" ] }
},
entry.js
var $ = require('jquery');
$.mobile = require('jquery-mobile');