quasar.config.js 7.5 KB

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