Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit 3717dc9

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 3717dc9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/vendor/jquery.ui.widget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)