willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.04k stars 339 forks source link

Avoid .mjs for module build #178

Closed diachedelic closed 4 years ago

diachedelic commented 4 years ago

I've read somewhere that providing a .mjs file (as we do in the "module" field) can cause issues with build systems which don't expect it. This swaps it for a .esm.js extension instead.

bmbrina commented 4 years ago

I was having the following issue: TypeError: Object(...) is not a function and I made the changes on this PR locally and it solved the issue.

Seems like import { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock' is returning undefinded in my project.

Is there any plan to merge this any time soon?

CC: @willmcpo

diachedelic commented 4 years ago

@bmbrina thanks for testing! @willmcpo I will merge this, please publish at your convenience.

Markovnin commented 4 years ago

@diachedelic can you push to npm please?

willmcpo commented 4 years ago

thanks again @diachedelic - released to npm.