// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({

  compatibilityDate: '2024-11-01',
  devtools: { enabled: true },
  modules: [
    '@nuxtjs/i18n',
    // '@nuxtjs/fontawesome'
  ],
  alias: {
    // 将 `@css` 映射到 `public/css` 文件夹
    '@': 'assets'
  },
  i18n: {
    locales: ["en","zh"],
    defaultLocale: 'zh',
    strategy: 'no_prefix',
    vueI18n: './i18n.config.ts',
  },
  runtimeConfig: {
    public: {
      baseApi: process.env.VITE_APP_BASE_URL,
    }
  },
  app: {
    head: {
      title: '开心中文',
      meta: [
        {
          name: 'charset',
          content: 'utf-8'
        },
        {
          name: 'viewport',
          content: 'width=device-width,width=1250,maximum-scale=1.0'
        },
        {
          name: 'renderer',
          content: 'webkit'
        }
      ],
      link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.svg' }]
    }
  },
  devServer: {
    port:3002
  }
  // css: [
  //   '@/css/swiper-bundle.min.css', // 引入 FontAwesome 样式
  // ],
  // build: {
  //   transpile: ['@fortawesome/fontawesome-free'], // 确保 FontAwesome 样式和字体文件能够被编译
  // }
})
