quasar.config.js 7.1 KB

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