From 537a936d447612496feab0214d5211742400fc69 Mon Sep 17 00:00:00 2001 From: Ricky Smith Date: Thu, 13 Aug 2026 15:20:12 +0200 Subject: [PATCH] Demo: Restore the `mjml` dependency to fix the welcome mail crash 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. --- demo/site/package.json | 1 + knip.json | 2 +- pnpm-lock.yaml | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/demo/site/package.json b/demo/site/package.json index ab4e81c1982..253b2b464ca 100644 --- a/demo/site/package.json +++ b/demo/site/package.json @@ -47,6 +47,7 @@ "filesize": "^10.1.6", "ioredis": "^5.10.1", "lru-cache": "^11.5.1", + "mjml": "^4.18.0", "next": "^16.2.10", "react": "^19.2.6", "react-dom": "^19.2.6", diff --git a/knip.json b/knip.json index 7f076af2402..fe6e1318daf 100644 --- a/knip.json +++ b/knip.json @@ -107,7 +107,7 @@ "demo/site": { "entry": ["./src/app/**", "./cache-handler.ts", "./server.ts", "./opentelemetry-metrics.ts", "tracing.dev.ts", "tracing.production.ts"], "project": ["./src/**/*.{ts,tsx}"], - "ignoreDependencies": ["@babel/core", "@types/grecaptcha"], + "ignoreDependencies": ["@babel/core", "@types/grecaptcha", "mjml"], "ignore": ["**/*.generated.ts"] }, "storybook": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6ace35437c..80832f11aa7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -566,6 +566,9 @@ importers: lru-cache: specifier: ^11.5.1 version: 11.5.1 + mjml: + specifier: ^4.18.0 + version: 4.18.0 next: specifier: ^16.2.10 version: 16.2.10(@babel/core@7.29.7)(@opentelemetry/api@1.9.1)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(sass@1.93.0)