bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 438 forks source link

TinyColor not getting exported when used in a electron app #223

Open TaromaruYuki opened 3 years ago

TaromaruYuki commented 3 years ago

So im trying to load tinycolor in a electron app. I add the cdn link to my index.html, but when i go in the developer console, I get this error. image

I also try accessing it from window.tinycolor, but that also isnt working. Downloading tinycolor locally also does not work.

Why is this happening? Is there another way to load it? It's working fine if I open in live server for example.

Im not using the node module, im just throwing the cdn in my html file.

bgrins commented 3 years ago

Can you send over the exact script tag you are using?

TaromaruYuki commented 3 years ago

@bgrins The script tag I'm using is <script src="https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.4.2/tinycolor.min.js" integrity="sha512-+aXA9mgbUvFe0ToTlbt8/3vT7+nOgUmFw29wfFCsGoh8AZMRSU0p4WtOvC1vkF2JBrndPN2TuNZsHPAKPPxe8Q==" crossorigin="anonymous"></script> but I have also downloaded the dist js file, and neither work. I have other libraries that load in fine, but TinyColor is the only one that has not.

TaromaruYuki commented 3 years ago

Update?