nuxt.config.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { defineNuxtConfig } from 'nuxt/config';
  2. import Components from 'unplugin-vue-components/vite';
  3. import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
  4. // https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
  5. export default defineNuxtConfig({
  6. ssr: true,
  7. devtools: { enabled: true },
  8. app: {
  9. head: {
  10. meta: [
  11. { charset: 'utf-8' },
  12. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  13. { name: 'keywords', content: '红杉天枰,人工智能,大模型,水务,水务大模型,水务机器人,LibraAI,碳中和,碳交易,碳资产开发,碳排放核算,CBAM,双碳路径规划,ESG' },
  14. { name: 'description', content: '红杉天枰致力于将人工智能技术应用于水务、消防、市政及碳中和等领域,打造“LibraAI+”系列垂直大模型,提升行业智能化水平。同时深耕双碳领域,提供专业的碳资产开发、碳交易咨询、ESG评估、CBAM策略制定以及双碳路径规划等全方位解决方案,助力企业和机构实现绿色可持续发展。' },
  15. ]
  16. }
  17. },
  18. i18n: {
  19. strategy: 'no_prefix',
  20. locales: ["en", "zh"],
  21. defaultLocale: 'zh',
  22. vueI18n: './i18n.config.ts',
  23. },
  24. tailwindcss: {
  25. configPath: '~/tailwind.config.ts',
  26. },
  27. runtimeConfig: {
  28. public: {
  29. apiBase: process.env.NUXT_PUBLIC_API_BASE,
  30. }
  31. },
  32. modules: [
  33. '@nuxtjs/i18n',
  34. '@nuxtjs/tailwindcss',
  35. 'nuxt-icons',
  36. 'nuxt-swiper',
  37. 'nuxt-aos'
  38. ],
  39. css: [
  40. "./assets/css/reset.css",
  41. ],
  42. aos: {
  43. duration: 800,
  44. delay: 0,
  45. anchorPlacement: 'center-bottom',
  46. easing: 'ease',
  47. once: true
  48. },
  49. build: {
  50. transpile: process.env.NODE_ENV === 'production' ? ['naive-ui', 'vueuc', '@css-render/vue3-ssr', '@juggle/resize-observer', 'date-fns', '@css-render/plugin-bem',] : ['@juggle/resize-observer']
  51. },
  52. vite: {
  53. css: {
  54. preprocessorOptions: {
  55. scss: {
  56. additionalData: '@use "@/assets/css/index.scss" as *;'
  57. }
  58. }
  59. },
  60. plugins: [
  61. Components({
  62. dts: true,
  63. resolvers: [NaiveUiResolver()],
  64. }),
  65. ],
  66. }
  67. })