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

export default defineNuxtConfig({
  app: {
    baseURL:'/',
  },
  nitro: {
    routeRules: {
      '/**': { trailingSlash: false }
    }
  },
  router: {
    // extendRoutes(routes, resolve) {
    //   routes.push({
    //     name: 'index_info',
    //     path: '/params/:param1', // * 表示可选的多个参数
    //     component: resolve(__dirname, 'pages/index_info.vue')
    //   });
    // }
  },
  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: "https://www.navigatortrades.com/",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/api/, ''),
        }
      }
    }
  }
})