You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Gatsby along with react-eva-icons the server-side rendering is broken when using regular import:
importIconfrom"react-eva-icons"
with error: " WebpackError: ReferenceError: window is not defined"
According to the error message the issue occurs in node_modules/eva-icons/eva.js:354:1
in the isOldIE function that is part of the eva-icon dependency. I've checked the source for eva-icons and didn't found any isOldIE function, so I assume that it is added by Webpack?
Anyway... I've fixed the issue with dynamic ES6 import:
When using Gatsby along with react-eva-icons the server-side rendering is broken when using regular import:
with error: " WebpackError: ReferenceError: window is not defined"
According to the error message the issue occurs in
node_modules/eva-icons/eva.js:354:1
in the
isOldIE
function that is part of theeva-icon
dependency. I've checked the source foreva-icons
and didn't found any isOldIE function, so I assume that it is added by Webpack?Anyway... I've fixed the issue with dynamic ES6 import:
I suppose it might be a good idea to add note about this in the Readme or perhaps find a better solution to this issue?
The text was updated successfully, but these errors were encountered: