// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  app: {
    baseURL: '/',
  },
  nitro: {
    routeRules: {
      '/**': { trailingSlash: false }
    }
  },
  ssr: false,
  css: [
    'swiper/css',
    'swiper/css/mousewheel',
    '@/assets/css/common.scss'
  ],
  devtools: { enabled: true },

  postcss: {
    plugins: {
      autoprefixer: {},
      tailwindcss: {},
    },
  },
  modules: ['@pinia/nuxt', 'nuxt-icons'],
  compatibilityDate: '2025-03-12',
  vite: {
    server: {
      proxy: {
        '/api': {
          target: "http://xysdwrmyy.cn/",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/api/, ''),
        }
      }
    }
  }
})