nuxt.config.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import tailwindcss from "@tailwindcss/vite"
  2. // noinspection JSUnresolvedReference
  3. export default defineNuxtConfig({
  4. compatibilityDate: "2026-03-13",
  5. css: ["~/assets/css/main.css"],
  6. // devServer: { port: 3000 },
  7. devtools: { enabled: true, timeline: { enabled: true } },
  8. experimental: { asyncContext: true },
  9. // future: { compatibilityVersion: 5 },
  10. imports: {
  11. dirs: ["mutations/**", "queries", "stores"]
  12. },
  13. modules: [
  14. "@nuxt/icon",
  15. "@pinia/nuxt",
  16. "@pinia/colada-nuxt",
  17. "@primevue/nuxt-module"
  18. ],
  19. nitro: {
  20. experimental: {
  21. asyncContext: true,
  22. websocket: true
  23. }
  24. },
  25. runtimeConfig: {
  26. public: {
  27. // api: { baseURL: "" },
  28. auth: { baseURL: "" },
  29. websocketHost: ""
  30. },
  31. betterAuth: { baseURL: "", secret: "" },
  32. // postmarkServerToken: "",
  33. prismaDatabaseURL: ""
  34. },
  35. vite: {
  36. plugins: [tailwindcss()],
  37. optimizeDeps: {
  38. include: [
  39. "@pinia/colada-devtools",
  40. "@primevue/core/api",
  41. "@primeuix/forms/resolvers/zod",
  42. "better-auth/client",
  43. "better-auth/client/plugins",
  44. "better-auth/plugins/access",
  45. "better-auth/plugins/admin/access",
  46. "lodash-es",
  47. "pinia-colada-plugin-normalizer",
  48. "socket.io-client",
  49. "tailwind-merge",
  50. "trix",
  51. "zod"
  52. ]
  53. },
  54. vue: {
  55. template: {
  56. compilerOptions: { isCustomElement: (tag) => tag.startsWith("trix-") }
  57. }
  58. }
  59. },
  60. // module configs
  61. icon: {
  62. size: "1em",
  63. class: "inline",
  64. mode: "svg",
  65. aliases: { personae: "fa6-solid:masks-theater" }
  66. },
  67. lodash: {
  68. prefix: "_",
  69. prefixSkip: false,
  70. upperAfterPrefix: false
  71. },
  72. pinia: { storesDirs: ["./app/stores/**"] },
  73. primevue: {
  74. importPT: { from: "~/utils/passthrough.js" },
  75. options: {
  76. ptOptions: { mergeSections: true, mergeProps: true },
  77. unstyled: true
  78. }
  79. }
  80. })