diff --git a/jquery.smooth-scroll.js b/jquery.smooth-scroll.js index 0f6279a..5158e7f 100644 --- a/jquery.smooth-scroll.js +++ b/jquery.smooth-scroll.js @@ -9,6 +9,9 @@ if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS + factory(require('jquery')); } else { // Browser globals factory(jQuery);