// https://nuxt.com/docs/api/configuration/nuxt-config

import Aura from '@primeuix/themes/aura'

export default defineNuxtConfig({
    modules: [
        '@nuxt/eslint',
        '@nuxt/image',
        '@nuxt/fonts',
        '@primevue/nuxt-module',
    ],
    ssr: true,
    devtools: { enabled: true },

    runtimeConfig: {
        apiHost: '',
    },

    routeRules: {
        '/api/**': {
            proxy: {
                to: process.env.NUXT_API_HOST + '/api/**',
            },
        },
    },
    compatibilityDate: '2025-07-15',
    vite: {
        css: {
            preprocessorOptions: {
                scss: {
                    additionalData: `@forward '~/assets/global';
                    @use '~/assets/variables' as *;`,
                },
            },
        },
    },
    eslint: {
        checker: true,

        config: {
            stylistic: true,
        },
    },

    primevue: {
        autoImport: true,
        options: {
            ripple: false,
            inputVariant: 'filled',
            theme: {
                preset: Aura,
            },
        },
    },
})
