eiriklv / react-masonry-component

A React.js component for using @desandro's Masonry
MIT License
1.44k stars 145 forks source link

webpack production build - SyntaxError #67

Closed finbarmaginn closed 7 years ago

finbarmaginn commented 7 years ago

I'm no expert and understand that raising this as an issue may not be the correct thing to do, I just cannot get it to work.

The plugin works fine in my dev build process but when trying to compile for production i'm getting this error.

ERROR in bundle.js from UglifyJs
SyntaxError: Unexpected token: name (forceItemReload) [./~/react-masonry-component/lib/index.js:68,0]

The error is coming from UglifyJs so could it be something to do with my webpack config? see below for the uglify plugin configuration that i've been using to minify react.

    new webpack.optimize.UglifyJsPlugin({
      compress: {
        screw_ie8: true
      }
    })
afram commented 7 years ago

Looks like an issue with a recent change. Thanks for bringing it up. Will look at it tonight

afram commented 7 years ago

Should hopefully be fixed in 5.0.2

Can you please verify?

afram commented 7 years ago

Sorry, can you please try 5.0.3 instead?

finbarmaginn commented 7 years ago

I can confirm that 5.0.3 is working. Thanks for a quick turnaround!