nuxt.config.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. /**/
  35. '/': { swr: 1800 },
  36. '/about/': { swr: 1800 },
  37. '/communicate/': { swr: 1800 },
  38. '/fusion/': { swr: 1800 },
  39. '/inheritor/': { swr: 1800 },
  40. '/introduction/': { swr: 1800 },
  41. '/news/': { swr: 1800 },
  42. '/research/': { swr: 1800 },
  43. '/introduction/**': { swr: true },
  44. '/communicate/**': { swr: true },
  45. '/fusion/**': { swr: true },
  46. '/inheritor/**': { swr: true },
  47. '/news/**': { swr: true },
  48. '/research/**': { swr: true },
  49. '/village/**': { swr: true },
  50. '/inheritor/submit': { ssr: false },
  51. }
  52. })