SupremeTechnopriest / react-idle-timer

User activity timer component
https://idletimer.dev
MIT License
1.15k stars 143 forks source link

Use .mjs extensions for ESM #352

Open rtsao opened 1 year ago

rtsao commented 1 year ago

Node interprets packages as CommonJS unless package "type": "module" is declared or .mjs extension is used.

This PR resolves this problem by using .mjs extensions for the ESM bundle.

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @SupremeTechnopriest on Vercel.

@SupremeTechnopriest first needs to authorize it.

alexfreska commented 11 months ago

Hey @SupremeTechnopriest thank you for the great package.

I am also hitting this issue, this package cannot be used in a package that gets imported into nextjs, here is some more context: https://github.com/vercel/next.js/issues/39375#issuecomment-1380443503 I tried manually changing to .mjs like this PR does, and it works great.