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

Provide a way of configuring the location of email templates

Open samtgarson opened this issue 2 years ago • 5 comments

I'm experimenting with adding this package to an already existing large monorepo, and I don't want to keep the email templates at the top level but it doesn't seem like there's a way of configuring this (it's hard coded here).

The dev command doesn't accept any options at the moment, is this something you're already considering?

(P.S. that constants file has a typo in the filename)

samtgarson avatar Dec 20 '22 18:12 samtgarson

Yes, we can the default directory to be emails, but this should be optional and the user can change it they want it.

bukinoshita avatar Dec 20 '22 19:12 bukinoshita

@bukinoshita any update here? Kind of a blocker at the moment

emroot avatar Jan 19 '23 22:01 emroot

@bukinoshita any update here? Kind of a blocker at the moment

Not yet, i'll take a look on Sunday or next week.

bukinoshita avatar Jan 20 '23 05:01 bukinoshita

Can I take this? Our team wants this right now!

m-shaka avatar Jan 25 '23 05:01 m-shaka

Feel free to take @m-shaka! Thanks

bukinoshita avatar Jan 26 '23 01:01 bukinoshita

@samtgarson @emroot @co-sic @GRA0007 we just published [email protected] which contains that option.

Can you try now?

https://github.com/resendlabs/react-email/pull/384 https://github.com/resendlabs/react-email/pull/401

zenorocha avatar Jan 28 '23 02:01 zenorocha

@zenorocha I found [email protected] seems to refer to an outdated script, while I'm not sure why it's there. bin.email in pakcage.json is ./dist/index.js, but actually new generated file is dist/source/index.js. https://github.com/resendlabs/react-email/blob/main/packages/react-email/package.json#L6

You can explore here https://www.npmjs.com/package/react-email/v/1.7.6?activeTab=explore image image

m-shaka avatar Jan 28 '23 03:01 m-shaka

@m-shaka just built a new version, 1.7.7, can you try now?

zenorocha avatar Jan 28 '23 04:01 zenorocha