quasar.config.js 7.6 KB

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