quasar.config.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. // Configuration for your app
  2. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file
  3. import { defineConfig } from '#q-app/wrappers'
  4. import { fileURLToPath } from 'node:url'
  5. export default defineConfig((ctx) => {
  6. return {
  7. // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
  8. // preFetch: true,
  9. // app boot file (/src/boot)
  10. // --> boot files are part of "main.js"
  11. // https://v2.quasar.dev/quasar-cli-vite/boot-files
  12. boot: ['i18n', 'axios'],
  13. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css
  14. css: ['app.scss'],
  15. // https://github.com/quasarframework/quasar/tree/dev/extras
  16. extras: [
  17. // 'ionicons-v4',
  18. // 'mdi-v7',
  19. // 'fontawesome-v6',
  20. // 'eva-icons',
  21. // 'themify',
  22. // 'line-awesome',
  23. // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
  24. 'roboto-font', // optional, you are not bound to it
  25. 'material-icons', // optional, you are not bound to it
  26. ],
  27. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
  28. build: {
  29. target: {
  30. browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
  31. node: 'node20',
  32. },
  33. vueRouterMode: 'history', // available values: 'hash', 'history'
  34. // vueRouterBase,
  35. // vueDevtools,
  36. // vueOptionsAPI: false,
  37. // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
  38. // publicPath: '/',
  39. // analyze: true,
  40. // env: {},
  41. // rawDefine: {}
  42. // ignorePublicFolder: true,
  43. // minify: false,
  44. // polyfillModulePreload: true,
  45. // distDir
  46. // extendViteConf (viteConf) {},
  47. // viteVuePluginOptions: {},
  48. vitePlugins: [
  49. [
  50. '@intlify/unplugin-vue-i18n/vite',
  51. {
  52. // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
  53. // compositionOnly: false,
  54. // if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}',
  55. // you need to set `runtimeOnly: false`
  56. // runtimeOnly: false,
  57. ssr: ctx.modeName === 'ssr',
  58. // you need to set i18n resource including paths !
  59. include: [fileURLToPath(new URL('./src/i18n', import.meta.url))],
  60. },
  61. ],
  62. [
  63. 'vite-plugin-checker',
  64. {
  65. eslint: {
  66. lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{js,mjs,cjs,vue}"',
  67. useFlatConfig: true,
  68. },
  69. },
  70. { server: false },
  71. ],
  72. ],
  73. },
  74. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#devserver
  75. devServer: {
  76. // https: true,
  77. open: true, // opens browser window automatically
  78. },
  79. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#framework
  80. framework: {
  81. config: {},
  82. // iconSet: 'material-icons', // Quasar icon set
  83. // lang: 'en-US', // Quasar language pack
  84. // For special cases outside of where the auto-import strategy can have an impact
  85. // (like functional components as one of the examples),
  86. // you can manually specify Quasar components/directives to be available everywhere:
  87. //
  88. // components: [],
  89. // directives: [],
  90. // Quasar plugins
  91. plugins: ['Notify'],
  92. },
  93. animations: 'all', // --- includes all animations
  94. // https://v2.quasar.dev/options/animations
  95. // animations: ['all'],
  96. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#sourcefiles
  97. // sourceFiles: {
  98. // rootComponent: 'src/App.vue',
  99. // router: 'src/router/index',
  100. // store: 'src/store/index',
  101. // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
  102. // pwaServiceWorker: 'src-pwa/custom-service-worker',
  103. // pwaManifestFile: 'src-pwa/manifest.json',
  104. // electronMain: 'src-electron/electron-main',
  105. // electronPreload: 'src-electron/electron-preload'
  106. // bexManifestFile: 'src-bex/manifest.json
  107. // },
  108. // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
  109. ssr: {
  110. prodPort: 3000, // The default port that the production server should use
  111. // (gets superseded if process.env.PORT is specified at runtime)
  112. middlewares: [
  113. 'render', // keep this as last one
  114. ],
  115. // extendPackageJson (json) {},
  116. // extendSSRWebserverConf (esbuildConf) {},
  117. // manualStoreSerialization: true,
  118. // manualStoreSsrContextInjection: true,
  119. // manualStoreHydration: true,
  120. // manualPostHydrationTrigger: true,
  121. pwa: false,
  122. // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
  123. // pwaExtendGenerateSWOptions (cfg) {},
  124. // pwaExtendInjectManifestOptions (cfg) {}
  125. },
  126. // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
  127. pwa: {
  128. workboxMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
  129. // swFilename: 'sw.js',
  130. // manifestFilename: 'manifest.json',
  131. // extendManifestJson (json) {},
  132. // useCredentialsForManifestTag: true,
  133. // injectPwaMetaTags: false,
  134. // extendPWACustomSWConf (esbuildConf) {},
  135. // extendGenerateSWOptions (cfg) {},
  136. // extendInjectManifestOptions (cfg) {}
  137. },
  138. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
  139. cordova: {
  140. // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
  141. },
  142. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
  143. capacitor: {
  144. hideSplashscreen: true,
  145. },
  146. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
  147. electron: {
  148. // extendElectronMainConf (esbuildConf) {},
  149. // extendElectronPreloadConf (esbuildConf) {},
  150. // extendPackageJson (json) {},
  151. // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
  152. preloadScripts: ['electron-preload'],
  153. // specify the debugging port to use for the Electron app when running in development mode
  154. inspectPort: 5858,
  155. bundler: 'packager', // 'packager' or 'builder'
  156. packager: {
  157. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  158. // OS X / Mac App Store
  159. // appBundleId: '',
  160. // appCategoryType: '',
  161. // osxSign: '',
  162. // protocol: 'myapp://path',
  163. // Windows only
  164. // win32metadata: { ... }
  165. },
  166. builder: {
  167. // https://www.electron.build/configuration/configuration
  168. appId: 'ijoyplay-client',
  169. },
  170. },
  171. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
  172. bex: {
  173. // extendBexScriptsConf (esbuildConf) {},
  174. // extendBexManifestJson (json) {},
  175. /**
  176. * The list of extra scripts (js/ts) not in your bex manifest that you want to
  177. * compile and use in your browser extension. Maybe dynamic use them?
  178. *
  179. * Each entry in the list should be a relative filename to /src-bex/
  180. *
  181. * @example [ 'my-script.ts', 'sub-folder/my-other-script.js' ]
  182. */
  183. extraScripts: [],
  184. },
  185. }
  186. })