// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ ssr: true, app: { head: { title: 'Veridian', htmlAttrs: { lang: 'en', }, meta: [ { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { name: 'format-detection', content: 'telephone=no' }, { name: 'description', content: 'A chat-based AI assistant for your LLMs.', }, { name: 'keywords', content: 'LLM, AI, Chat, Assistant, Agent, LLMs, OpenAI, GPT, GPT-3, GPT-4, Claude, ChatGPT, Whisper, Bard, Bing, Anthropic, DeepAI, Dolly, StableLM, Vicuna, Llama, Alpaca, ChatGLM, MOSS, MPT, Codex, Codex2, Codex 3, Codex 4, Falcon, Flan-T5, T5, Llama2, LLaMA, LLaMA2, StableLM, OpenAssistant, OpenChat', }, ], script: [ { innerHTML: ` (function() { try { const cookies = document.cookie.split('; '); const colorSchemeCookie = cookies.find(row => row.startsWith('colorScheme=')); const colorScheme = colorSchemeCookie ? decodeURIComponent(colorSchemeCookie.split('=')[1]) : 'system'; if (colorScheme === 'system') { const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; document.documentElement.classList.remove('light', 'dark'); document.documentElement.classList.add(prefersDark ? 'dark' : 'light'); } else { document.documentElement.classList.remove('light', 'dark'); document.documentElement.classList.add(colorScheme); } } catch (e) {} })(); `, tagPosition: 'head', type: 'text/javascript', }, { innerHTML: ` (function() { const parent = document.createElement("div"); parent.setAttribute("style", "width:30px;height:30px;overflow:auto;position:absolute;top:-9999px;"); document.documentElement.appendChild(parent); const child = document.createElement("div"); child.setAttribute("style", "width:100%;height:40px"); parent.appendChild(child); const scrollbarWidth = parent.offsetWidth - child.offsetWidth; if (scrollbarWidth > 0) { document.documentElement.classList.add("has-obtrusive-scrollbars"); document.documentElement.style.setProperty('--scrollbar-width', scrollbarWidth + 'px'); parent.style.scrollbarWidth = 'thin'; const thinWidth = parent.offsetWidth - child.offsetWidth; document.documentElement.style.setProperty('--thin-scrollbar-width', thinWidth + 'px'); } document.documentElement.removeChild(parent); })(); `, tagPosition: 'bodyOpen', type: 'text/javascript', }, { src: 'https://cdn.jsdelivr.net/npm/eruda', }, { innerHTML: ` eruda.init(); `, } ] }, }, vue: { config: { performance: true, } }, vite: { server: { allowedHosts: true, }, optimizeDeps: { include: [ // shiki 'shiki/core', 'shiki/wasm', 'shiki/engine/javascript', 'shiki/engine/oniguruma', '@shikijs/themes/vitesse-dark', '@shikijs/themes/vitesse-light', '@shikijs/langs/vue', '@shikijs/langs/javascript', '@shikijs/langs/typescript', '@shikijs/langs/tsx', '@shikijs/langs/python', '@shikijs/langs/css', '@shikijs/langs/html', '@shikijs/langs/markdown', '@shikijs/langs/json', '@shikijs/langs/bash', '@vue/devtools-core', '@vue/devtools-kit', '@sentry/nuxt', '@nuxt/hints/runtime/hydration/component', '@nuxt/hints/runtime/lazy-load/composables', '@tanstack/vue-virtual', 'shiki', 'better-auth/vue', 'unified', 'remark-gfm', 'remark-parse', 'remark-rehype', 'remark-math', 'rehype-katex', 'unist-util-visit', '@triplit/client', '@triplit/db', 'sorted-btree', 'elen', 'comlink', 'nanoid' ], }, build: { commonjsOptions: { transformMixedEsModules: true, } }, }, nitro: { experimental: { websocket: true, } }, // bizarely, when I enable this, it adds an 8 second or so lag when I navigate to a different page occasionally // experimental: { // viewTransition: true, // }, modules: [ '@nuxt/hints', '@unocss/nuxt', 'triplit-nuxt', // '@sentry/nuxt/module', '@nuxt/fonts' ], triplit: { schema_path: './triplit/schema.ts', serverUrl: process.env.NUXT_PUBLIC_TRIPLIT_URL, token: process.env.NUXT_TRIPLIT_ANON_TOKEN, storage: 'memory', // we will connect automatically in the auth plugin when we call startSession autoConnect: false, }, devtools: { enabled: true, timeline: { enabled: true, }, }, compatibilityDate: '2025-07-15', // sentry: { // org: 'veridian-ol', // project: 'javascript-nuxt', // }, sourcemap: { client: 'hidden', }, });