quasar.config.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /* eslint-env node */
  2. // Configuration for your app
  3. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
  4. import { configure } from "quasar/wrappers";
  5. import { fileURLToPath } from "node:url";
  6. export default configure((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. "i18n",
  15. "axios",
  16. "setPermissions",
  17. "defaultPropsComponents",
  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: "history", // available values: 'hash', 'history'
  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. API_URL: ctx.dev ? "http://localhost:8000" : "http://localhost:8000",
  49. PASSWORD: ctx.dev ? "S@ft2080." : "",
  50. WEBSOCKET_API: ctx.dev
  51. ? "http://localhost:4321/"
  52. : "http://localhost:4321/",
  53. WEBSOCKET_PATH: ctx.dev ? "/socket.io" : "/socket.io",
  54. WEBSOCKET_ROOM: ctx.dev ? "LARAVEL" : "LARAVEL",
  55. WEBSOCKET_API_KEY:
  56. "7wArC/kl0nTbt4zBu0agw.NXLyjA96I6x1XmBcuokwPqfo3/CIxzqYw.PTthh5eqa08Uf4ubFlOqatpShoz1CRRID9pZReEFvBk3il6E9u",
  57. },
  58. // rawDefine: {}
  59. // ignorePublicFolder: true,
  60. // minify: false,
  61. // polyfillModulePreload: true,
  62. // distDir
  63. // extendViteConf (viteConf) {},
  64. // viteVuePluginOptions: {},
  65. vitePlugins: [
  66. [
  67. "@intlify/unplugin-vue-i18n/vite",
  68. {
  69. // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
  70. // compositionOnly: false,
  71. // if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}',
  72. // you need to set `runtimeOnly: false`
  73. // runtimeOnly: false,
  74. ssr: ctx.modeName === "ssr",
  75. // you need to set i18n resource including paths !
  76. include: [fileURLToPath(new URL("./src/i18n", import.meta.url))],
  77. },
  78. ],
  79. [
  80. "vite-plugin-checker",
  81. {
  82. eslint: {
  83. lintCommand: 'eslint "./**/*.{js,mjs,cjs,vue}"',
  84. },
  85. },
  86. { server: false },
  87. ],
  88. ],
  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: "auto",
  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: "quasar-skeleton",
  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. });