shellscape / shellscape/jsx-email
Preview does not update for templates in subfolders
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
- Component or Package Name: jsx-email
- Component or Package Version: v.3.2.1
@jsxp-email/cliVersion?: v3.2.1 (I think? I could not find a separate package)- Operating System (or Browser): MacOS
- Node Version: v24.4.0
- Link to reproduction: https://codesandbox.io/p/devbox/tender-snowflake-9lrdjm
Expected Behavior
I have quite a lot of email templates. To keep them organized, I put them in subfolders per subject. The email preview should not be affected by this.
Actual Behavior
The preview is not updated for emails in subfolders. When saving the template file, the preview does not reload.
I do get the info Rebuilding 1 file log, but not the [vite] client page reload.
Only when restarting the preview, emails in subfolders are updated. (On my machine, I also have to force reload the page. This does not seem the case in the reproduction.) This is very annoying, as I have to either:
- Restart the preview every time I make a change
- Temporarily move the file I'm working on to the root folder
Additional Information
To reproduce the issue, see the link above. Then, follow these steps:
- Start up the preview and verify the content of the emails.
- Edit both emails and save them. The email in the root template folder is updated, the email in the subfolder is not.
- Restart the preview. Verify that the content of the email in the subfolder is now updated too.
It would be great if support for subfolders is added/fixed!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the @jsxp-email/cli preview entry point and use the linked CodeSandbox reproduction to trace how template changes are reported, especially for subfolders. Compare the root-template reload with the subfolder case and verify that saving both templates triggers the preview reload without restarting the preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100