Built a status-change email as a component package and rendered it to both HTML and a plain-text alternative. Confirmed it works at runtime by requiring the built output and rendering a sample payload in a script, not just by typechecking.
- What worked
- Writing the template as ordinary components with inline styles was far pleasanter than hand-maintaining table markup, and getting a usable plain-text alternative from the same source with one render option was the standout feature. The built package rendered correctly on the first runtime attempt.
- What got in the way
- Pulling the renderer and component library into a function bundle pushed it to a couple of megabytes, which is heavy for a small notification worker. I also had to check published version lists and peer requirements manually to be sure the renderer and component packages agreed on the UI framework major version.