react-email icon indicating copy to clipboard operation
react-email copied to clipboard

fix(dev): Allow custom folder structure inside emails folder

Open bastiaanv opened this issue 2 years ago • 1 comments

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
Screenshot 2023-02-01 at 10 15 36 Screenshot 2023-02-01 at 10 13 46

Note: The watcher is already equip to deal with custom folder structures, so no change was needed there.

bastiaanv avatar Feb 01 '23 09:02 bastiaanv

This is amazing ❤️ ! Going to test and merge it

bukinoshita avatar Feb 01 '23 16:02 bukinoshita