codecks-io / react-sticky-box

Sticky boxes for contents of all sizes
https://react-sticky-box.codecks.io/
ISC License
469 stars 44 forks source link

1.0.1 does not work with react scripts 4.X #78

Closed repoit closed 2 years ago

repoit commented 2 years ago

React-sticky-box 1.0.1 works fine when using react scripts 5.X

[...]
"react-scripts": "^5.0.0",
"react-sticky-box": "^1.0.1",
[...]

However, when using 4.X for react-scripts the import of react-sticky-box fails

[...]
"react-scripts": "^4.0.3",
"react-sticky-box": "^1.0.1",
[...]

import StickyBox from "react-sticky-box";

Module not found: Can't resolve 'react-sticky-box'

Any idea on how to resolve this issue? Upgrading to react-scripts is not really an option as it introduced major code breaks to many depending libraries.

danielberndt commented 2 years ago

I assume it's due to being offered as an ESM module? Haven't looked into how react-scripts support those.

In that case 0.9.3 should still work fine. The api is pretty much the same, it just lacks the hook.

danielberndt commented 2 years ago

Merging #77 could possibly have helped. Can you check whether 1.0.2 works for you?

repoit commented 2 years ago

@danielberndt Upgrading to 1.0.2 fixed the issue. Thank you.