sandiiarov/use-events

1.4.0 build can no longer be imported by webpack

martinbroos opened this issue · 3 comments

When i'm looking at your changes I see you made the change to use pika as your bundler. I'm not familiar with and now i'm not sure how to use the package. This fails with webpack:

import { useMousePosition } from 'use-events';

Do I need @pika/web in my application now or is their another way to get it working with webpack? When i'm importing the src file directly I'm getting a loader error as my webpack config can not handle esm modules I guess.

same error in gatsby

Should work in 1.4.1

Tested and works again 👍