Closed iammati closed 3 years ago
Nevermind, since webpack is building by "moving" the variables inside a function scope it's obviously that e.g. Pickr or any other kind of (local) variable isn't accessible..
Primary the issue was caused by the fact that when passing the el-attribute (which represents a query / element) to pickr which doesn't exists throws a not really userfriendly error, maybe adding a condition that such an element / node doesn't exists with the passed query would be better (for future users?).
Thanks anyways for this open-source neat colorpicker, appreciate it @Simonwep ! :)
Uncaught ReferenceError: Pickr is not defined - followed instructions but still not callable?
Your environment:
I've tried adding both normal as the es5 pickr.min.js files but when calling Pickr.create or just Pickr inside the DevTools console it's keep throwing me this:
Uncaught ReferenceError: Pickr is not defined
. I took a look into the Network tab of DevTools, which shows me that pickr.min.js has been loaded fine with a HTTP status header 200 (which is fine). I've no idea what could cause this behaviour..?