Skip to content

Preview does not update for templates in subfolders #458

@joasjacobse-agro4all

Description

@joasjacobse-agro4all
  • Component or Package Name: jsx-email
  • Component or Package Version: v.3.2.1
  • @jsxp-email/cli Version?: 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:

  1. Start up the preview and verify the content of the emails.
  2. Edit both emails and save them. The email in the root template folder is updated, the email in the subfolder is not.
  3. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions