We are trying to steal AMDfied jquery.cookie library, jquery.js is
loaded twice as steal also supports AMD syntax.
How to load it as a regular library using steal?
// can/util/jquery/jquery.js
steal('jquery',
'can/util/can.js', 'can/util/array/each.js',
function($, can) { // jquery is loaded
// jquery.cookie.js
(function
(factory) {
if (typeof
define === 'function' && define.amd) {
// AMD
(Register as an anonymous module)
define(['jquery'], factory);
//
jquery is loaded
} else {
//
Browser globals
factory(jQuery);
}
}(function ($) {
// library code
}));