nuxt.config.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. import tailwindcss from "@tailwindcss/vite"
  2. import { fileURLToPath } from "node:url"
  3. // noinspection JSUnresolvedReference
  4. export default defineNuxtConfig({
  5. app: {
  6. head: {
  7. link: [
  8. { rel: "apple-touch-icon", href: "/apple-touch-icon.png" },
  9. { rel: "icon", href: "/theater-masks-solid.svg" },
  10. { rel: "manifest", href: "/manifest.json" },
  11. { rel: "mask-icon", href: "/theater-masks-solid.svg", color: "#9fe88d" }
  12. ],
  13. meta: [
  14. { charset: "UTF-8" },
  15. { name: "theme-color", content: "#9fe88d" },
  16. { name: "viewport", content: "width=device-width, initial-scale=1.0" }
  17. ],
  18. title: "Dramatis Personae"
  19. }
  20. },
  21. alias: {
  22. test: fileURLToPath(new URL("./test", import.meta.url)),
  23. },
  24. compatibilityDate: "2026-04-13",
  25. css: ["~/assets/css/main.css"],
  26. // devServer: { port: 3000 },
  27. devtools: {
  28. enabled: true,
  29. timeline: { enabled: true }
  30. },
  31. experimental: { asyncContext: true },
  32. // future: { compatibilityVersion: 5 },
  33. imports: {
  34. dirs: ["mutations/**", "queries", "stores"]
  35. },
  36. modules: [
  37. "@nuxt/icon",
  38. "@pinia/nuxt",
  39. "@pinia/colada-nuxt",
  40. "@primevue/nuxt-module",
  41. ...(process.env.NODE_ENV === "test" ? ["@nuxt/test-utils/module"] : [])
  42. ],
  43. nitro: {
  44. experimental: {
  45. asyncContext: true,
  46. websocket: true
  47. }
  48. },
  49. runtimeConfig: {
  50. public: {
  51. // api: { baseURL: "" },
  52. auth: { baseURL: "" },
  53. websocketHost: ""
  54. },
  55. betterAuth: { baseURL: "", secret: "" },
  56. // postmarkServerToken: "",
  57. prismaDatabaseURL: ""
  58. },
  59. vite: {
  60. plugins: [tailwindcss()],
  61. optimizeDeps: {
  62. include: [
  63. "@pinia/colada-devtools",
  64. "@pinia/colada-plugin-delay",
  65. "@primevue/core/api",
  66. "@primeuix/forms/resolvers/zod",
  67. "better-auth/client",
  68. "better-auth/client/plugins",
  69. "better-auth/plugins/access",
  70. "better-auth/plugins/admin/access",
  71. "lodash-es",
  72. "pinia-colada-plugin-normalizer",
  73. "socket.io-client",
  74. "tailwind-merge",
  75. "trix",
  76. "zod"
  77. ]
  78. },
  79. vue: {
  80. template: {
  81. compilerOptions: { isCustomElement: (tag) => tag.startsWith("trix-") }
  82. }
  83. }
  84. },
  85. // module configs
  86. icon: {
  87. size: "1em",
  88. class: "inline",
  89. mode: "svg",
  90. aliases: { personae: "fa6-solid:masks-theater" }
  91. },
  92. lodash: {
  93. prefix: "_",
  94. prefixSkip: false,
  95. upperAfterPrefix: false
  96. },
  97. pinia: { storesDirs: ["./app/stores/**"] },
  98. primevue: {
  99. importPT: { from: "~/utils/passthrough.js" },
  100. options: {
  101. ptOptions: { mergeSections: true, mergeProps: true },
  102. unstyled: true
  103. }
  104. }
  105. })