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

  future: {
    compatibilityVersion: 4,
  },

  devtools: { enabled: true },

  // 开发服务器配置
  devServer: {
    host: '0.0.0.0',
    port: 5068,
  },

  modules: ['@pinia/nuxt', '@vant/nuxt', 'pinia-plugin-persistedstate/nuxt'],

  // 自动导入配置 - 使用完整路径
  imports: {
    dirs: ['stores', 'composables', 'extends', 'services/**', 'model/**'],
  },

  pinia: {
    storesDirs: ['./src/stores/**'],
  },

  typescript: {
    strict: true,
    shim: false,
  },

  app: {
    head: {
      title: '航海时代',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        { name: 'keywords', content: '航海时代2|纵横四海|雄霸四海' },
        {
          name: 'description',
          content:
            '航海时代是2022年推出的一款以航海为背景的wap文字游戏，让玩家穿越到15世纪的大航海时代，了解各地不同的风土人情；淋漓尽致的演绎航海时代的血雨腥风。',
        },
      ],
    },
  },

  css: ['~/assets/css/style.css'],

  compatibilityDate: '2024-04-03',
})
