From fdb0c49dce601fcd9fa10f7e38c608e4af81e8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=85=E8=86=80?= Date: Fri, 16 Oct 2026 22:31:17 +0800 Subject: [PATCH] fix(nuxt): pre-bundle the CommonJS deps of the markdown stack `debug` and `extend` are imported by micromark and unified through @elysola/ui. Served unbundled by the dev server they have no default export, so the console page failed with a 500 in `nuxt dev`. --- nuxt.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 549abea..f119cb6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -37,6 +37,12 @@ export default defineNuxtConfig({ }, vite: { plugins: [tailwindcss()], + // `debug` and `extend` are CommonJS packages @elysola/ui's markdown stack + // (micromark, unified) imports; served unbundled in dev they lack a default + // export and the console fails to start. + optimizeDeps: { + include: ["debug", "extend"], + }, }, devtools: { enabled: false }, runtimeConfig: {