How we build each package before publishing
@react-email/tailwind
package which currently uses vite
due to a few issues with tsup
and tailwindcss
’s bundling.)
To build a package run:
tsup
with a few settings, typically src/index.ts --format esm,cjs --dts --external react
.
Tsup handles building both ESM and
CJS versions along with the type definitions exported from the entry point, src/index.ts
, without bundling react
, which can cause issues.