KineticJS icon indicating copy to clipboard operation
KineticJS copied to clipboard

Loading AMD KineticJS gives empty object when using minified, compressed code

Open ghost opened this issue 12 years ago • 3 comments

I am using the Dojo AMD loader, and when I use Kinetic minified file, the require callback only receives an empty object. Switching the source to the full source gives what's expected where the require function's callback receives the full Kinetic object.

ghost avatar Oct 18 '13 23:10 ghost

Works for me for latest kineticjs version with requirejs.

lavrton avatar Nov 16 '13 12:11 lavrton

@lavrton I never had any issue loading it with requirejs. Only with Dojo. My assumption is that KineticJS optimizations in the compressed code ends up breaking some of the AMD-detection code. The Dojo AMD loader successfully loads uncompressed KineticJS, but simply returns an empty object if I use the compressed version of KineticJS.

ghost avatar Nov 16 '13 22:11 ghost

Previously, I was having the same issue with RequireJS. I tried the latest kinetic.min.js, and the problem appears to be resolved.

mjhasbach avatar Jul 07 '14 02:07 mjhasbach