// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  app: {
    head: {
      title: '锦泽健康',
      htmlAttrs: {
        lang: 'zh',
      },
      charset: 'utf-8',
      viewport: 'width=device-width, initial-scale=1, maximum-scale=5',
      meta: [
        { name: 'description', content: '锦泽健康是一家提供多元化养老服务的机构' }
      ],
    },
  },
  ssr: false,
  
  compatibilityDate: '2025-07-15',
  devtools: { enabled: true },
  modules:['@unocss/nuxt', '@nuxt/image', '@element-plus/nuxt'],
  image: {
    quality: 80,
    // CSR/静态站点：关闭转换，直接输出原始链接，避免依赖 /_ipx
    provider: 'none',
    format: ['webp']
  },
  nitro: {
    compressPublicAssets: {
      gzip: true,
      brotli: true,
    },
  },
  elementPlus: {},
  build: {
    transpile: ['sharp'],
  },
  experimental: {
    // 禁用 _payload.json 提取，避免 CSR 下额外请求
    payloadExtraction: false,
  },
  // ssr 中启用
  // routeRules:{
  //   '/': { prerender: true },
  // },
  // hooks: {
  //   'prerender:routes' ({ routes }) {
  //     routes.clear()
  //   }
  // },
})