Closed jeerbl closed 7 years ago
Hello,
When define is defined and define.amd exists, it defines the module with a dependency on jQuery as you can see in the code below:
define
define.amd
if (typeof define === 'function' && define.amd) { define(['jquery'], function() { return Odometer; }); } else if (typeof exports !== "undefined" && exports !== null) { module.exports = Odometer; } else { window.Odometer = Odometer; }
My project does not use jQuery and, when packaging with Webpack, I get the error
ERROR in ./~/odometer/odometer.js Module not found: Error: Cannot resolve module 'jquery' in /Users/jbrunel/Documents/Projects/TrackInsight/view/src/public/map/node_modules/odometer @ ./~/odometer/odometer.js 644:4-646:6
Is there any reason why there is a dependency on jQuery when using define but not in the other cases?
I can provide a pull request to fix this if you are OK.
Thanks, Jerome
Created PR #128.
Fix merged in PR #128
Hello,
When
define
is defined anddefine.amd
exists, it defines the module with a dependency on jQuery as you can see in the code below:My project does not use jQuery and, when packaging with Webpack, I get the error
Is there any reason why there is a dependency on jQuery when using
define
but not in the other cases?I can provide a pull request to fix this if you are OK.
Thanks, Jerome