import { fileURLToPath } from 'node:url'; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ future: { compatibilityVersion: 4, }, compatibilityDate: '2025-02-04', devtools: { enabled: true }, modules: [ '@nuxtjs/i18n', '@nuxtjs/tailwindcss', '@pinia/nuxt', '@eschricht/nuxt-color-mode', 'radix-vue/nuxt', '@nuxt/eslint', ], colorMode: { preference: 'system', fallback: 'light', classSuffix: '', cookieName: 'theme', }, i18n: { // https://i18n.nuxtjs.org/docs/guide/server-side-translations experimental: { localeDetector: './localeDetector.ts', }, locales: [ { // same as i18n.config.ts code: 'en', // BCP 47 language tag language: 'en-US', name: 'English', }, { code: 'uk', language: 'uk-UA', name: 'Українська', }, { code: 'fr', language: 'fr-FR', name: 'Français', }, { code: 'de', language: 'de-DE', name: 'Deutsch', }, { code: 'zh-HK', language: 'zh-HK', name: '繁體中文(香港)', }, { code: 'zh-CN', language: 'zh-CN', name: '简体中文', }, { code: 'ko', language: 'ko-KR', name: '한국어', }, ], defaultLocale: 'en', vueI18n: './i18n.config.ts', strategy: 'no_prefix', detectBrowserLanguage: { useCookie: true, }, bundle: { optimizeTranslationDirective: false, }, }, nitro: { esbuild: { options: { // to support big int target: 'es2020', }, }, alias: { '#db': fileURLToPath(new URL('./server/database/', import.meta.url)), }, externals: { traceInclude: [fileURLToPath(new URL('./cli/index.ts', import.meta.url))], }, }, alias: { // for typecheck reasons (https://github.com/nuxt/cli/issues/323) '#db': fileURLToPath(new URL('./server/database/', import.meta.url)), }, });