quasar.config.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. PAGARME_PUBLIC_KEY: process.env.PAGARME_PUBLIC_KEY ?? "pk_test_1VRWkbvu43Tyk7qG",
  64. },
  65. // rawDefine: {}
  66. // ignorePublicFolder: true,
  67. // minify: false,
  68. // polyfillModulePreload: true,
  69. // distDir
  70. // extendViteConf (viteConf) {},
  71. // viteVuePluginOptions: {},
  72. vitePlugins: [
  73. [
  74. "@intlify/unplugin-vue-i18n/vite",
  75. {
  76. include: [fileURLToPath(new URL("./src/i18n", import.meta.url))],
  77. ssr: ctx.modeName === "ssr",
  78. },
  79. ],
  80. [
  81. "vite-plugin-checker",
  82. {
  83. eslint: {
  84. lintCommand:
  85. 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
  86. useFlatConfig: true,
  87. },
  88. },
  89. { server: false },
  90. ],
  91. ],
  92. },
  93. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
  94. devServer: {
  95. // https: true
  96. open: false, // opens browser window automatically
  97. },
  98. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  99. framework: {
  100. lang: "pt-BR",
  101. config: {
  102. dark: "auto",
  103. notify: {
  104. position: "top-right",
  105. },
  106. },
  107. // iconSet: 'material-icons', // Quasar icon set
  108. // lang: 'en-US', // Quasar language pack
  109. // For special cases outside of where the auto-import strategy can have an impact
  110. // (like functional components as one of the examples),
  111. // you can manually specify Quasar components/directives to be available everywhere:
  112. //
  113. // components: [],
  114. // directives: [],
  115. // Quasar plugins
  116. plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"],
  117. },
  118. // animations: 'all', // --- includes all animations
  119. // https://v2.quasar.dev/options/animations
  120. animations: [],
  121. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  122. // sourceFiles: {
  123. // rootComponent: 'src/App.vue',
  124. // router: 'src/router/index',
  125. // store: 'src/store/index',
  126. // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
  127. // pwaServiceWorker: 'src-pwa/custom-service-worker',
  128. // pwaManifestFile: 'src-pwa/manifest.json',
  129. // electronMain: 'src-electron/electron-main',
  130. // electronPreload: 'src-electron/electron-preload'
  131. // bexManifestFile: 'src-bex/manifest.json
  132. // },
  133. // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
  134. ssr: {
  135. prodPort: 3000, // The default port that the production server should use
  136. // (gets superseded if process.env.PORT is specified at runtime)
  137. middlewares: [
  138. "render", // keep this as last one
  139. ],
  140. // extendPackageJson (json) {},
  141. // extendSSRWebserverConf (esbuildConf) {},
  142. // manualStoreSerialization: true,
  143. // manualStoreSsrContextInjection: true,
  144. // manualStoreHydration: true,
  145. // manualPostHydrationTrigger: true,
  146. pwa: false,
  147. // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
  148. // will mess up SSR
  149. // pwaExtendGenerateSWOptions (cfg) {},
  150. // pwaExtendInjectManifestOptions (cfg) {}
  151. },
  152. // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
  153. pwa: {
  154. workboxMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest'
  155. // swFilename: 'sw.js',
  156. // manifestFilename: 'manifest.json'
  157. // extendManifestJson (json) {},
  158. // useCredentialsForManifestTag: true,
  159. // injectPwaMetaTags: false,
  160. // extendPWACustomSWConf (esbuildConf) {},
  161. // extendGenerateSWOptions (cfg) {},
  162. // extendInjectManifestOptions (cfg) {}
  163. },
  164. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
  165. cordova: {
  166. // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
  167. },
  168. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
  169. capacitor: {
  170. hideSplashscreen: true,
  171. },
  172. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
  173. electron: {
  174. // extendElectronMainConf (esbuildConf) {},
  175. // extendElectronPreloadConf (esbuildConf) {},
  176. // extendPackageJson (json) {},
  177. // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
  178. preloadScripts: ["electron-preload"],
  179. // specify the debugging port to use for the Electron app when running in development mode
  180. inspectPort: 5858,
  181. bundler: "packager", // 'packager' or 'builder'
  182. packager: {
  183. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  184. // OS X / Mac App Store
  185. // appBundleId: '',
  186. // appCategoryType: '',
  187. // osxSign: '',
  188. // protocol: 'myapp://path',
  189. // Windows only
  190. // win32metadata: { ... }
  191. },
  192. builder: {
  193. // https://www.electron.build/configuration/configuration
  194. appId: "quasar-skeleton",
  195. },
  196. },
  197. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
  198. bex: {
  199. // extendBexScriptsConf (esbuildConf) {},
  200. // extendBexManifestJson (json) {},
  201. contentScripts: ["my-content-script"],
  202. },
  203. };
  204. });