nuxt.config.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // https://nuxt.com/docs/api/configuration/nuxt-config
  2. export default defineNuxtConfig({
  3. compatibilityDate: '2025-05-15',
  4. app: {
  5. head: {
  6. title: '闽南文化生态保护区(厦门市)',
  7. viewport: 'width=device-width, initial-scale=1, maximum-scale=1',
  8. htmlAttrs: {
  9. lang: 'zh',
  10. },
  11. link: [
  12. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  13. ]
  14. }
  15. },
  16. devtools: { enabled: true },
  17. srcDir: 'src/',
  18. modules: ['@pinia/nuxt', '@ant-design-vue/nuxt'],
  19. components: [
  20. {
  21. path: '~/components',
  22. pathPrefix: false,
  23. extensions: ['.vue'],
  24. }
  25. ],
  26. build: {
  27. transpile: [
  28. '@imengyu/vue-scroll-rect',
  29. '@imengyu/imengyu-utils',
  30. ],
  31. },
  32. routeRules: {
  33. //'/**': { swr: false, isr: false, headers: { 'cache-control': 'no-store, max-age=0' } }
  34. '/': { swr: 1800 },
  35. '/about/': { swr: 86400 },
  36. '/communicate/': { swr: 86400 },
  37. '/fusion/': { swr: 86400 },
  38. '/inheritor/': { swr: 3600 },
  39. '/introduction/': { swr: 3600 },
  40. '/news/': { swr: 3600 },
  41. '/research/': { swr: 86400 },
  42. '/introduction/**': { swr: true },
  43. '/communicate/**': { swr: true },
  44. '/fusion/**': { swr: true },
  45. '/inheritor/**': { swr: true },
  46. '/news/**': { swr: true },
  47. '/research/**': { swr: true },
  48. '/village/**': { swr: true },
  49. '/inheritor/submit': { ssr: false },
  50. }
  51. })