quasar.config.js 7.3 KB

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