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

Configuration for dev server

Open FidelElie opened this issue 2 years ago • 3 comments

Hey love this so far, wanted to ask if there is a way to configure different parts of the development server. Currently I am integrating the react-emails library into an existing nextjs app. So I was thinking:

  • Is there a way to change the port that the dev server runs on?

  • Is there a way to change the directory path that the file watcher scans so the emai; files can be placed in a different directory location?

  • This is tangential but would it be possible to integrate styling systems iike Tailwind into this process, as I currently use this and css modules in my app. As long as compatible css rules were used, would this be possible somehow?

I would love to contribute if I am able to this and other things. Thanks

FidelElie avatar Jan 19 '23 16:01 FidelElie

I'd also like to suggest the ability to blacklist directories for the preview app. It would be nice not to see my email components directory in the preview app without needing to move it outside the emails directory.

Edit: My bad. This exact case is supported. I did need to reload the server after adding the components directory for it to take effect though.

ImBaedin avatar Jan 24 '23 04:01 ImBaedin

Lots of great stuff here, thanks @FidelElie! Let's break it down into multiple feature requests?

Is there a way to change the port that the dev server runs on?

https://github.com/resendlabs/react-email/issues/372

Is there a way to change the directory path that the file watcher scans so the email files can be placed in a different directory location?

https://github.com/resendlabs/react-email/issues/248

This is tangential but would it be possible to integrate styling systems iike Tailwind into this process, as I currently use this and css modules in my app. As long as compatible css rules were used, would this be possible somehow?

https://github.com/resendlabs/react-email/issues/219

zenorocha avatar Jan 24 '23 06:01 zenorocha

Great thanks @zenorocha will have a look at each of these

FidelElie avatar Jan 24 '23 08:01 FidelElie

Yoo! I created this PR with Tailwind support! https://github.com/resendlabs/react-email/pull/382

vinicoder avatar Jan 26 '23 23:01 vinicoder

Closing this in favor of the other issues @FidelElie, let's follow or those open issues.

bukinoshita avatar Jan 27 '23 16:01 bukinoshita