From 718bfa669165a6854be3719ae89f0838dfbbad33 Mon Sep 17 00:00:00 2001 From: Admin Date: Tue, 10 Mar 2026 19:01:43 +0500 Subject: [PATCH] fix(ui): bundle marked into server output via ssr.noExternal Production Docker image has no node_modules at runtime; marked was being externalized by adapter-node (it is in dependencies), causing ERR_MODULE_NOT_FOUND when +page.server.ts and +server.ts imported it. Adding it to ssr.noExternal forces Vite to inline it into the server bundle. --- ui/vite.config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/vite.config.ts b/ui/vite.config.ts index bf699a8..b6def13 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -3,5 +3,11 @@ import tailwindcss from '@tailwindcss/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [tailwindcss(), sveltekit()] + plugins: [tailwindcss(), sveltekit()], + ssr: { + // Force these packages to be bundled into the server output rather than + // treated as external requires. The production Docker image has no + // node_modules, so anything used in server-side code must be inlined. + noExternal: ['marked'] + } });