Closed nerdstep closed 8 years ago
That line was a (probably misguided) attempt to cover off AMD modules as well as Node.js (CommonJS) modules. I've never used AMD modules, and most likely got it wrong! In view of that, I recently removed the AMD module definitions, but haven't yet released a new version. I will put together a new release ASAP.
Bit me a few days ago trying to bundle the module in a webpack:ed application. No issues when used in a node application though.
Removing the conditionals was good enough for my needs: https://github.com/tomsun/geodesy/commit/821cac0e718f13b00dddfe915955628ff86e98b6
@nerdstep: I have released a new version 1.1.0 to npm without AMD module requests.
@tomsun: the conditionals are required for use in browsers using <script>
tags; roll on ES2015 modules!
Hii, I'm having this same problem how can I solve it while using webpack ?
Trying to require the module in my project fails due the
define
statement inlatlon-spherical.js
, line 444 is trying to defined[Dms]
as a dependency which is looking for it as a module innode_modules
. I fixed it by removing the value. Not sure it's needed there anyway, as there is a required statement for it at the top of the file.