Closed wdj82 closed 1 month ago
It also works on v1.7.8
on remix@2.0.1
I did get it working after more fiddling with remix settings. Seems it has to be set for cjs and not esm. But still get the window not defined error with 1.7.9
I don't think the issue is strictly related to Remix. The problem was likely introduced in this commit (@brunolemos FYI).
The problem is that window.__unlayer_lastEditorId = window.__unlayer_lastEditorId || 0;
is executed as a side effect as soon as the file is imported. This breaks SSR for any file that includes react-email-editor
.
Going back to version 1.7.8
of react-email-editor
fixes the problem.
I am using Nextjs version 13.0.0 or 13.4.7.
But there is this problem for me. Both on version react-email-editor 1.7.8 and on version react-email-editor 1.7.9
.
.
This problem occurs when I want to build
Trying to upgrade my project to remix 2.0. In remix 1.8 I have no problem with react-email-editor v1.7.7.
Upgrading to remix 2.0 I'm getting the following error:![image](https://github.com/unlayer/react-email-editor/assets/37749088/cbdcabc7-3129-4cb1-a17a-fc921ad984d0)
I get the same error in remix 1.8 with newer versions but not 1.7.7