Skip to content

Demo: Restore the mjml dependency to fix the welcome mail crash - #6201

Open
VPS-Ricky wants to merge 1 commit into
mainfrom
fix-mjml-dependency-demo-site
Open

Demo: Restore the mjml dependency to fix the welcome mail crash#6201
VPS-Ricky wants to merge 1 commit into
mainfrom
fix-mjml-dependency-demo-site

Conversation

@VPS-Ricky

@VPS-Ricky VPS-Ricky commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The site does not import mjml. It renders mail through @dextinity/mail-react/server, which imports mjml itself. The entry therefore looks unnecessary, which is why it was removed.

It is still needed. Next.js can load a server package at runtime instead of bundling it, but only when the package can be found from the site's own node_modules, because that is where the runtime load looks for it. pnpm puts it there only when package.json lists it. Without the entry, Next.js bundles mjml, and with it uglify-js, which reads its own files from disk when it loads and does not find them in the bundle.

@VPS-Ricky VPS-Ricky self-assigned this Aug 13, 2026
@VPS-Ricky
VPS-Ricky force-pushed the fix-mjml-dependency-demo-site branch from 0c5279a to 7b88e9b Compare August 13, 2026 13:33
The site does not import `mjml`. It renders mail through
`@dextinity/mail-react/server`, which imports `mjml` itself. The entry
therefore looks unnecessary, which is why it was removed.

It is still needed. Next.js can load a server package at runtime
instead of bundling it, but only when the package can be found from the
site's own `node_modules`, because that is where the runtime load looks
for it. pnpm puts it there only when `package.json` lists it. Without
the entry, Next.js bundles `mjml`, and with it `uglify-js`, which reads
its own files from disk when it loads and does not find them in the
bundle.
@VPS-Ricky
VPS-Ricky force-pushed the fix-mjml-dependency-demo-site branch from 7b88e9b to 537a936 Compare August 13, 2026 14:30
@VPS-Ricky
VPS-Ricky marked this pull request as ready for review August 13, 2026 14:49
@github-actions
github-actions Bot requested a review from VPS-Obi August 13, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants