Description
Describe the Bug
I am trying to use react-email with TRPC and Next.js I ran a profiler on the output of next build
with @next/bundle-analyzer
It said the largest package was coming from @react-email/tailwind/dist/index.mjs
I am running Next.js with Open-Next deployed with SST on a Lambda in AWS. The larger the Node.js portion of the next.js code is, the longer it takes for the lambda to start. Currently it looks like @react-email/tailwind
is 6.5MB
At first glance, it looks like it's pulling in all of tailwindcss and postcss here: https://github.com/resend/react-email/blob/canary/packages/tailwind/src/utils/get-css-for-markup.ts#L1-L4
Is there a way we can make this package smaller?
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/resend/react-email/tree/canary/packages/tailwind
To Reproduce
Run next build
with @next/bundle-analyzer
Expected Behavior
The dist folder to be smaller.
What's your node version? (if relevant)
No response