desandro / imagesloaded

:camera: JavaScript is all like "You images done yet or what?"
https://imagesloaded.desandro.com
MIT License
8.88k stars 1.15k forks source link

Does this support Electron? #273

Closed tyrumus closed 5 years ago

tyrumus commented 6 years ago

In my Electron project I'm working on right now, I'm getting the following error:

Uncaught Error: Cannot find module 'ev-emitter'

I know that I'm loading jQuery properly, because I'm able to use to make an Ajax GET call. Here's how I'm loading everything:

window.$ = window.jQuery = require('./libs/jquery.min.js')
require('./libs/imagesloaded.pkgd.min.js')

I've tried both the minified and unminified versions. I even tried require('./libs/ev-emitter.js) as a separate dependency, even though it's packaged in imagesloaded. Is there something I'm doing wrong?

desandro commented 6 years ago

I recommend installing imagesloaded and requiring imagesloaded.js, not imagesloaded.pkgd.js