Closed positlabs closed 8 years ago
Glorious man! Thanks!
As pointed out by @AureliePrd there is an error where "module is not defined". (https://github.com/thinkpixellab/PxLoader/commit/613791ed96479acfed2e2835753c1376a1dbd142#commitcomment-14711450)
I think it should use the following syntax
if (typeof module !== 'undefined' && module.exports)
Can you please release a tagged version including CommonJS support. Thanks.
The way exports are defined in PxLoader are incompatible with CommonJS. The PxLoader script becomes un-scoped from the window, so exporting to
this
is useless.CommonJS support can be added with this line:
if(module && module.exports) module.exports = PxLoader;