diff --git a/src/gridstack.js b/src/gridstack.js index 9b7aaa7..afd7843 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -8,6 +8,11 @@ define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', 'jquery-ui/resizable'], factory); } + else if (typeof exports !== 'undefined') { + try { jQuery = require('jquery'); } catch(e) {} + try { _ = require('lodash'); } catch(e) {} + factory(jQuery, _); + } else { factory(jQuery, _); }