quasar.config.js 7.6 KB

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