nuxt.config.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: ['@imengyu/vue-scroll-rect'],
  28. },
  29. routeRules: {
  30. '/': { swr: 1/* 1800 */ },
  31. '/about/': { swr: 86400 },
  32. '/communicate/': { swr: 86400 },
  33. '/fusion/': { swr: 86400 },
  34. '/inheritor/': { swr: 3600 },
  35. '/introduction/': { swr: 3600 },
  36. '/news/': { swr: 3600 },
  37. '/research/': { swr: 86400 },
  38. '/introduction/**': { swr: true },
  39. '/communicate/**': { swr: true },
  40. '/fusion/**': { swr: true },
  41. '/inheritor/**': { swr: true },
  42. '/news/**': { swr: true },
  43. '/research/**': { swr: true },
  44. '/village/**': { swr: true },
  45. '/inheritor/submit': { ssr: false },
  46. }
  47. })