quasar.config.js 7.5 KB

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