tristen / hoverintent

:mouse: Fire mouse events when a user intends it
https://tristen.ca/hoverintent/
MIT License
331 stars 54 forks source link

Change npm main to CommonJS module #22

Closed davidtheclark closed 7 years ago

davidtheclark commented 7 years ago

The UMD definition in index.js was causing problems for me when importing the module, because this (and therefore global) is not defined in the module source type.

This PR changes index.js (which is the main file in package.json) to export a standard CommonJS module. The output in dist still provides a UMD build for those who need it.

I also added a changelog. Because this is a breaking change (though not a significant one), I thought users might want a quick reference to see what happened.

@tristen for review.

tristen commented 7 years ago

LGTM!