Skip to content

Commit eabc1ed

Browse files
IMMINJUclaude
andcommitted
Fix Vercel deploy: replace isomorphic-dompurify with sanitize-html
isomorphic-dompurify loads jsdom which depends on html-encoding-sniffer -> @exodus/bytes (ESM-only). Vercel Serverless uses CJS require() so this crashes all API routes with ERR_REQUIRE_ESM. sanitize-html is pure Node.js with no DOM dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 415aaf4 commit eabc1ed

3 files changed

Lines changed: 112 additions & 63 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"drizzle-orm": "^0.45.1",
6262
"file-type": "^21.3.0",
6363
"formidable": "^3.5.4",
64-
"isomorphic-dompurify": "^3.0.0",
6564
"lowlight": "^3.3.0",
6665
"lucide-react": "^0.562.0",
6766
"next": "16.1.1",
@@ -79,6 +78,7 @@
7978
"react-dom": "19.2.3",
8079
"react-email": "^5.2.5",
8180
"react-hook-form": "^7.71.1",
81+
"sanitize-html": "^2.17.1",
8282
"sonner": "^2.0.7",
8383
"tailwind-merge": "^3.4.0",
8484
"tippy.js": "^6.3.7",
@@ -96,6 +96,7 @@
9696
"@types/nodemailer": "^7.0.5",
9797
"@types/react": "^19",
9898
"@types/react-dom": "^19",
99+
"@types/sanitize-html": "^2.16.1",
99100
"@vitest/coverage-v8": "^4.0.18",
100101
"dotenv": "^17.2.3",
101102
"drizzle-kit": "^0.31.8",

0 commit comments

Comments
 (0)