react-email
react-email copied to clipboard
fix(dev): Allow custom folder structure inside emails folder
Currently, the dev server only allows us (implicitly) to create the following folders inside the email-folder: components & static. Sub folders are not allowed inside the components-folder which can lead to a messy folder structure.
This PR allows us to create the folder structure we want/need for the project, while still moving the files in the static-folder to the public-folder for NextJS. A nice side-effect is that all files are now moved to the NextJS server, like custom interfaces in .ts-files or json data (fixes #379). Project example:
| Before | After |
|---|---|
![]() |
![]() |
Note: The watcher is already equip to deal with custom folder structures, so no change was needed there.
This is amazing ❤️ ! Going to test and merge it

