Skip to content

Commit 0e5c74a

Browse files
committed
Add CommonJS support
1 parent 1c1f58d commit 0e5c74a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jQuery.XDomainRequest.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
if (typeof define === 'function' && define.amd) {
99
// AMD. Register as anonymous module.
1010
define(['jquery'], factory);
11+
} else if (typeof exports === 'object') {
12+
// CommonJS
13+
module.exports = factory(require('jquery'));
1114
} else {
1215
// Browser globals.
1316
factory(jQuery);
@@ -111,4 +114,4 @@ $.ajaxTransport('* text html xml json', function(options, userOptions, jqXHR) {
111114
};
112115
});
113116

114-
}));
117+
}));

0 commit comments

Comments
 (0)