benmajor / jQuery-Touch-Events

A collection of mobile event plugins for jQuery.
MIT License
699 stars 225 forks source link

Webpack usage #167

Closed gerabu closed 1 year ago

gerabu commented 4 years ago

How can this be used with webpack? I'm trying to use this with webpack, but events are not exposed globally and/or they aren't fired up

yCodeTech commented 1 year ago

Not sure about your dev environment, but if like me you've installed the script via npm, then you'll need to add import "@benmajor/jquery-touch-events"; to the top of your JavaScript file, to be able to load in and use the events from the script.

To be honest, this point should be added to the README file for npm installation section, as it can be an overlooked important part of installation. (CC: @benmajor )

benmajor commented 1 year ago

Yeah, that's definitely a good point -- it has now been added to the NPM section of the README. Thanks, @yCodeTech!