From f79441c45903844123a7aaecfcef7616e29735a5 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Fri, 5 Jul 2024 09:01:59 +0900 Subject: [PATCH] fix(website): hack next-mdx-remote with vite config (DEV only) (#779) Hmm, this is going to be a big problem with ESM/CJS compat... Maybe related: #421, #428 --- packages/website/vite.config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/website/vite.config.ts diff --git a/packages/website/vite.config.ts b/packages/website/vite.config.ts new file mode 100644 index 000000000..297b82e23 --- /dev/null +++ b/packages/website/vite.config.ts @@ -0,0 +1,13 @@ +/** @type {import('vite').UserConfig} */ +export default ({ mode }: { mode: string }) => { + if (mode === 'development') { + return { + ssr: { + optimizeDeps: { + include: ['next-mdx-remote/rsc'], + }, + }, + }; + } + return {}; +};