cyntler / hamburger-react

Animated hamburger menu icons for React.js weighs only 1.5 KB.
https://hamburger-react.netlify.app
MIT License
963 stars 36 forks source link

Module parse failed : Unexpected token #44

Closed Wullver closed 3 years ago

Wullver commented 3 years ago

Hello,

I tried to install your package and there is a compilation error in the package :

"./node_modules/hamburger-react/dist-esm/Spin.js Module parse failed: Unexpected token (12:13) You may need an appropriate loader to handle this file type. | onKeyUp: e => e.key === 'Enter' && o.handler(), | role: "button", | style: { ...o.burgerStyles, | transform: ${o.isToggled ?rotate(${180 * (o.isLeft ? -1 : 1)}deg): 'none'} | },"

The problem seems to be "...o.burgerStyles", when I delete it, the package compile correctly,

Can you solve my issue please ? Thanks a lot

luukdv commented 3 years ago

Hi @Wullver, can you provide a link to something like Codepen / Codesandbox with a minimal reproducible example?

There is unfortunately not enough information provided to indicate where the issue originates.

Wullver commented 3 years ago

Hello, Thank you for your fast answer.

After a test with Codesandbox I undertood the problem, my "react-scripts" was version 1.1.5 for some reasons, after updated it your package worth perfectly.

Thank you again ! :)

luukdv commented 3 years ago

Good to hear!