Skip to content
Discussion options

You must be logged in to vote

We have further investigated this, and it's indeed the issue with the library not being supported by our build tools.
As suggested

If still not working, try removing (function () { 'use strict'; ... construct from the lib and see if that's the cause.

Besides removing the AMD wrapper, which this conversion defaults to

// export as Node module / AMD module / browser variable
if (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;
else if (typeof define === 'function' && define.amd) define(SunCalc);
else window.SunCalc = SunCalc;

you have to re-export the module with ecmascript support. Considering it's mostly built with prototypes, here's the straightfo…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@silver-zepp
Comment options

@utpluvia
Comment options

@silver-zepp
Comment options

@utpluvia
Comment options

@utpluvia
Comment options

Comment options

You must be logged in to vote
3 replies
@utpluvia
Comment options

@silver-zepp
Comment options

@utpluvia
Comment options

Answer selected by utpluvia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants