Skip to content

Commit b69c7db

Browse files
committed
Bring back support for CommonJS
Browserify, which follows CommonJS module conventions, parses the AST for `require` calls to determine the dependencies of a project. jQuery File Upload used to support this; it was removed in e2cda46 when a new version of jquery.ui.widget.js was vendored.
1 parent a451d60 commit b69c7db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/vendor/jquery.ui.widget.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery UI - v1.12.1 - 2018-02-10
1+
/*! jQuery UI - v1.12.1+CommonJS - 2018-02-10
22
* http://jqueryui.com
33
* Includes: widget.js
44
* Copyright jQuery Foundation and other contributors; Licensed MIT */
@@ -8,6 +8,10 @@
88

99
// AMD. Register as an anonymous module.
1010
define([ "jquery" ], factory );
11+
} else if ( typeof exports === "object" ) {
12+
13+
// Node/CommonJS
14+
factory( require( "jquery" ) );
1115
} else {
1216

1317
// Browser globals

0 commit comments

Comments
 (0)