vadimsva / waitMe

jquery plugin for easy creating loading css3/images animations
http://vadimsva.github.io/waitMe/
MIT License
328 stars 84 forks source link

integration in webpack / Angular2 setup #11

Closed LanderBeeuwsaert closed 7 years ago

LanderBeeuwsaert commented 7 years ago

I'm trying to integrate waitme into a webpack / angular 2 project based on: https://github.com/AngularClass/angular2-webpack-starter.

I've added jQuery through npm as explained in: https://github.com/AngularClass/angular2-webpack-starter/wiki/How-to-include-jQuery

Ive included waitMe.js in the index.html:

However, I'm getting: VM461 waitMe.js:284 Uncaught ReferenceError: jQuery is not defined Which seems to refer to the last line of waitMe.js: })(jQuery);

I've tried: http://stackoverflow.com/questions/26749045/webpack-expressing-module-dependency

but to no avail.

Any ideas?

Kind regards.

vadimsva commented 7 years ago

Hi, i think that probably incorrect added jquery. May be after waitme.js

LanderBeeuwsaert commented 7 years ago

Yes, I think the problem lies in that I add jQuery through npm/webpack, and not through html. I've resolved it (for the moment) by adding jQuery in the html template before waitme.

However, my preferred solution would be to be able to add everything through npm/webpack, als waitme. Any plans for hosting waitme through npm?

vadimsva commented 7 years ago

I haven't experience with npm, as I will the some time, I will learn and perhaps add it to npm

LanderBeeuwsaert commented 7 years ago

Ok, cool, thanks for the response!