Getting error in build time Ionic react : WebpackError: ReferenceError: window is not defined

#1

Hello ,
i am using reactjs (gatsbyjs) with ionic and i have this problem in build time .

Everything works well except in build time , i don’t know why .
Any help?