import { type Config, defineConfig } from 'waku/config' import mdx from 'fumadocs-mdx/vite' import * as MdxConfig from './source.config.js' import tailwindcss from '@tailwindcss/vite' import type { UserConfig } from 'vite' export default defineConfig({ basePath: process.env.DOCS_BASE_PATH ?? '/', vite: { // we do this to avoid Vite from bundling React contexts and cause duplicated contexts conflicts. optimizeDeps: { exclude: ['fumadocs-ui', 'fumadocs-core'], include: ['fumadocs-ui > unified', 'fumadocs-core > remark', 'fumadocs-core > hast-util-to-jsx-runtime'] }, resolve: { tsconfigPaths: true, external: ['@takumi-rs/image-response'] }, plugins: [tailwindcss(), mdx(MdxConfig)] } satisfies UserConfig as Config['vite'] })