quasar.config.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /* eslint-env node */
  2. // Configuration for your app
  3. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
  4. import { defineConfig } from "#q-app/wrappers";
  5. import { fileURLToPath } from "node:url";
  6. import { config as loadEnv } from "dotenv";
  7. loadEnv();
  8. export default defineConfig((ctx) => {
  9. return {
  10. bin: {
  11. linuxAndroidStudio: "/snap/bin/android-studio",
  12. },
  13. // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
  14. // preFetch: true,
  15. // app boot file (/src/boot)
  16. // --> boot files are part of "main.js"
  17. // https://v2.quasar.dev/quasar-cli-vite/boot-files
  18. boot: [
  19. "axios",
  20. "i18n",
  21. "defaultPropsComponents",
  22. "push-notifications",
  23. // "socket.io",
  24. ],
  25. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
  26. css: ["app.scss"],
  27. // https://github.com/quasarframework/quasar/tree/dev/extras
  28. extras: [
  29. // 'ionicons-v4',
  30. "mdi-v7",
  31. // 'fontawesome-v6',
  32. // 'eva-icons',
  33. // 'themify',
  34. // "line-awesome",
  35. // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
  36. "roboto-font", // optional, you are not bound to it
  37. "material-icons", // optional, you are not bound to it
  38. ],
  39. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
  40. build: {
  41. target: {
  42. browser: ["es2022", "firefox115", "chrome115", "safari14"],
  43. node: "node22",
  44. },
  45. vueRouterMode: "history", // available values: 'hash', 'history'
  46. // vueRouterBase,
  47. // vueDevtools,
  48. // vueOptionsAPI: false,
  49. // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
  50. // publicPath: '/',
  51. // analyze: true,
  52. env: {
  53. API_URL: ctx.dev ? "http://localhost:3000" : "http://localhost:3000",
  54. PASSWORD: ctx.dev ? "S@ft2080." : "",
  55. WEBSOCKET_API: ctx.dev
  56. ? "http://localhost:4321/"
  57. : "http://localhost:4321/",
  58. WEBSOCKET_PATH: ctx.dev ? "/socket.io" : "/socket.io",
  59. WEBSOCKET_ROOM: ctx.dev ? "LARAVEL" : "LARAVEL",
  60. WEBSOCKET_API_KEY:
  61. "7wArC/kl0nTbt4zBu0agw.NXLyjA96I6x1XmBcuokwPqfo3/CIxzqYw.PTthh5eqa08Uf4ubFlOqatpShoz1CRRID9pZReEFvBk3il6E9u",
  62. GOOGLE_MAPS_API_KEY: process.env.GOOGLE_MAPS_API_KEY ?? "",
  63. },
  64. // rawDefine: {}
  65. // ignorePublicFolder: true,
  66. // minify: false,
  67. // polyfillModulePreload: true,
  68. // distDir
  69. // extendViteConf (viteConf) {},
  70. // viteVuePluginOptions: {},
  71. vitePlugins: [
  72. [
  73. "@intlify/unplugin-vue-i18n/vite",
  74. {
  75. include: [fileURLToPath(new URL("./src/i18n", import.meta.url))],
  76. ssr: ctx.modeName === "ssr",
  77. },
  78. ],
  79. [
  80. "vite-plugin-checker",
  81. {
  82. eslint: {
  83. lintCommand:
  84. 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
  85. useFlatConfig: true,
  86. },
  87. },
  88. { server: false },
  89. ],
  90. ],
  91. },
  92. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
  93. devServer: {
  94. // https: true
  95. open: false, // opens browser window automatically
  96. },
  97. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  98. framework: {
  99. lang: "pt-BR",
  100. config: {
  101. dark: "auto",
  102. notify: {
  103. position: "top-right",
  104. },
  105. },
  106. // iconSet: 'material-icons', // Quasar icon set
  107. // lang: 'en-US', // Quasar language pack
  108. // For special cases outside of where the auto-import strategy can have an impact
  109. // (like functional components as one of the examples),
  110. // you can manually specify Quasar components/directives to be available everywhere:
  111. //
  112. // components: [],
  113. // directives: [],
  114. // Quasar plugins
  115. plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"],
  116. },
  117. // animations: 'all', // --- includes all animations
  118. // https://v2.quasar.dev/options/animations
  119. animations: [],
  120. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  121. // sourceFiles: {
  122. // rootComponent: 'src/App.vue',
  123. // router: 'src/router/index',
  124. // store: 'src/store/index',
  125. // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
  126. // pwaServiceWorker: 'src-pwa/custom-service-worker',
  127. // pwaManifestFile: 'src-pwa/manifest.json',
  128. // electronMain: 'src-electron/electron-main',
  129. // electronPreload: 'src-electron/electron-preload'
  130. // bexManifestFile: 'src-bex/manifest.json
  131. // },
  132. // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
  133. ssr: {
  134. prodPort: 3000, // The default port that the production server should use
  135. // (gets superseded if process.env.PORT is specified at runtime)
  136. middlewares: [
  137. "render", // keep this as last one
  138. ],
  139. // extendPackageJson (json) {},
  140. // extendSSRWebserverConf (esbuildConf) {},
  141. // manualStoreSerialization: true,
  142. // manualStoreSsrContextInjection: true,
  143. // manualStoreHydration: true,
  144. // manualPostHydrationTrigger: true,
  145. pwa: false,
  146. // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
  147. // will mess up SSR
  148. // pwaExtendGenerateSWOptions (cfg) {},
  149. // pwaExtendInjectManifestOptions (cfg) {}
  150. },
  151. // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
  152. pwa: {
  153. workboxMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest'
  154. // swFilename: 'sw.js',
  155. // manifestFilename: 'manifest.json'
  156. // extendManifestJson (json) {},
  157. // useCredentialsForManifestTag: true,
  158. // injectPwaMetaTags: false,
  159. // extendPWACustomSWConf (esbuildConf) {},
  160. // extendGenerateSWOptions (cfg) {},
  161. // extendInjectManifestOptions (cfg) {}
  162. },
  163. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
  164. cordova: {
  165. // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
  166. },
  167. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
  168. capacitor: {
  169. hideSplashscreen: true,
  170. },
  171. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
  172. electron: {
  173. // extendElectronMainConf (esbuildConf) {},
  174. // extendElectronPreloadConf (esbuildConf) {},
  175. // extendPackageJson (json) {},
  176. // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
  177. preloadScripts: ["electron-preload"],
  178. // specify the debugging port to use for the Electron app when running in development mode
  179. inspectPort: 5858,
  180. bundler: "packager", // 'packager' or 'builder'
  181. packager: {
  182. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  183. // OS X / Mac App Store
  184. // appBundleId: '',
  185. // appCategoryType: '',
  186. // osxSign: '',
  187. // protocol: 'myapp://path',
  188. // Windows only
  189. // win32metadata: { ... }
  190. },
  191. builder: {
  192. // https://www.electron.build/configuration/configuration
  193. appId: "quasar-skeleton",
  194. },
  195. },
  196. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
  197. bex: {
  198. // extendBexScriptsConf (esbuildConf) {},
  199. // extendBexManifestJson (json) {},
  200. contentScripts: ["my-content-script"],
  201. },
  202. };
  203. });