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

getting error when trying to use the library #36

Closed dianaGreece closed 5 years ago

dianaGreece commented 5 years ago

HI could you please help me I am trying to use the react-sticky-box but I am getting an error, I have imported the library like this: import StickyBox from "react-sticky-box/dist/esnext";

but I am getting the below error.

from UglifyJs Unexpected token: operator (>) [./~/react-sticky-box/dist/esnext/index.js:5,0]

how could I solve this?

thank you in advance

danielberndt commented 5 years ago

Hi,

this indeed looks like a setup issue to me. You seem to be using a very old version of uglify that doesn't support arrow functions. So you probably might be better off using react-sticky-box/dist/es.