yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

Failed to minify the code ... react-flickity-component/src/index.js:8 #25

Closed podenphant closed 6 years ago

podenphant commented 6 years ago

When invoking 'yarn run build' this error occurs

"Failed to minify the code from this file:

    ./node_modules/react-flickity-component/src/index.js:8

"

yaodingyd commented 6 years ago

what kind of minifier you are using? do you have a repo of your configurations?

zengoma commented 6 years ago

I'm having the same issue. I used react-create-app to initialize the project and installed flickity using npm. Perhaps this might help (apparently code has to be compiled to ES5 before publishing to npm): http://bit.ly/2tRViJ9 Hoping that we can solve this without ejecting.

yaodingyd commented 6 years ago

@zengoma For a quick fix you can go to your node_modules/react-flickity-component/package.json, and remove this line "module": "./src/index",.

zengoma commented 6 years ago

@yaodingyd Thank you for the quick response. That certainly did work, the production build runs without any issues now. You're a star!

theolampert commented 6 years ago

thanks everyone, new version published to npm