// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ modules: ['@vueuse/nuxt', '@pinia/nuxt', '@nuxt/icon', '@nuxt/image', '@vant/nuxt'], compatibilityDate: '2025-07-15', // devtools: { enabled: true }, css: ['~/assets/scss/main.scss'], // 全局样式文件 plugins: ['~/plugins/index.js'], app: { head: { templateParams: { separator: '-' }, titleTemplate: '%s', meta: [ { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }, { name: 'description', content: '盾网络 - 专注于企业级DDoS/CC防护与安全加速的网络安全服务商。提供高防服务器、高防CDN、游戏盾SDK等全方位安全防护解决方案。' }, { name: 'keywords', content: '高防服务器,DDoS防护,CC防护,高防CDN,游戏盾,网络安全,服务器加速' }, { property: 'og:site_name', content: '盾网络' }, { property: 'og:type', content: 'website' }, { name: 'twitter:card', content: 'summary_large_image' } ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] } }, postcss: { plugins: { autoprefixer: { overrideBrowserslist: ['last 15 versions'] }, 'postcss-pxtorem': { rootValue: 37.5, unitPrecision: 4, propList: ['*'], selectorBlackList: [ 'html', 'body', // 排除所有不以 mb- 开头的类选择器 /^\.(?!mb-)/ ], replace: true, mediaQuery: false, minRemValue: 0 } } }, icon: { localApiEndpoint: '/nuxt-icon' }, image: { // format: ['avif', 'webp', 'png'] format: ['webp', 'png'] }, nitro: { devProxy: { '/api': { target: 'http://localhost:8080', // 你的后端地址 changeOrigin: true, prependPath: true } } }, routeRules: { '/web/**': { appLayout: 'web' }, '/mobile/**': { appLayout: 'mobile' } } // vite: { // css: { // preprocessorOptions: { // scss: { // additionalData: '@use "~/assets/_colors.scss" as *;' // } // } // } // } })