askides / react-plock

The 1kB Masonry Grid for React.
https://react-plock-with-nextjs.vercel.app
MIT License
493 stars 10 forks source link

Build fails on Gatsby project - WebpackError: ReferenceError: window is not defined #18

Closed ramit-mitra closed 2 years ago

ramit-mitra commented 2 years ago

Hello, I am using react-plock for a Gatsby project and it's causing the build to fail.

Definition in package.json, "react-plock": "^1.1.0",

Error message, WebpackError: ReferenceError: window is not defined

Please look into the issue and release a fix. Thank you for the great package and all the hard work.

ramit-mitra commented 2 years ago

The issue occurs in versions 1.1.0 and 1.2.0. Installing version 1.0.0 with gatsby 4.14 does not cause this exception during the build.

ramit-mitra commented 2 years ago

Raised a PR to hopefully get it sorted, please review https://github.com/itsrennyman/react-plock/pull/19

askides commented 2 years ago

Hi, released.