Live reload with common email layout component #268
-
Hi, I am using jsx-email with keycloakify-emails to generate Keycloak email templates. I only have 1 problem. When following the guide there is an emails folder with a layout.tsx, and a templates folder. I have generated password-reset.tsx inside that folder, and live reload when using preview works great for that file. But not when I make changes to layout.tsx in the parent directory. So I basically have to make my common email layout blind. Is there a way around this? Would not have been a problem if my email layout was already finished, since then I would only make changes to the template files anyway. Or maybe I am just a shitty coder, and it is not a problem for you guys since you just compile it in your heads. Tried putting the layout file inside the templates folder, but that fails since it seems to only work for .tsx-files which export Template. Have tried searching the docs for a solution but have not succeeded yet. Any help would be appreciated! Edit: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This changed in 2.4.2 with fixes to the watcher to prevent recursive watching problems with Next.js apps. Always important to read the There are more details in the associated PR for that change. We're working on making import/dependency watching and reload working again. I don't have an ETA for it, but it will be before the end of the year. In the mean time, you'll have to restart the preview when import/dependency files change. We don't normally rollback things like this, but the implementation that was in place was causing more problems that it was worth. |
Beta Was this translation helpful? Give feedback.
This changed in 2.4.2 with fixes to the watcher to prevent recursive watching problems with Next.js apps. Always important to read the
CHANGELOG
for any npm package you're using. https://github.com/shellscape/jsx-email/blob/main/packages/jsx-email/CHANGELOG.md#bugfixes-4There are more details in the associated PR for that change.
We're working on making import/dependency watching and reload working again. I don't have an ETA for it, but it will be before the end of the year.
In the mean time, you'll have to restart the preview when import/dependency files change. We don't normally rollback things like this, but the implementation that was in place was causing more problems that it was wo…