quasar.config.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /* eslint-env node */
  2. /*
  3. * This file runs in a Node context (it's NOT transpiled by Babel), so use only
  4. * the ES6 features that are supported by your Node version. https://node.green/
  5. */
  6. // Configuration for your app
  7. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
  8. const { configure } = require('quasar/wrappers')
  9. const path = require('path')
  10. module.exports = configure(function (/* ctx */) {
  11. return {
  12. eslint: {
  13. fix: true,
  14. // include = [],
  15. // exclude = [],
  16. // rawOptions = {},
  17. warnings: true,
  18. errors: true
  19. },
  20. // https://v2.quasar.dev/quasar-cli/prefetch-feature
  21. preFetch: true,
  22. // app boot file (/src/boot)
  23. // --> boot files are part of "main.js"
  24. // https://v2.quasar.dev/quasar-cli/boot-files
  25. boot: [
  26. 'apollo',
  27. 'components',
  28. 'i18n'
  29. ],
  30. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
  31. css: [
  32. 'app.scss'
  33. ],
  34. // https://github.com/quasarframework/quasar/tree/dev/extras
  35. extras: [
  36. // 'ionicons-v4',
  37. // 'mdi-v5',
  38. 'fontawesome-v6',
  39. // 'eva-icons',
  40. // 'themify',
  41. 'line-awesome',
  42. 'roboto-font-latin-ext' // this or either 'roboto-font', NEVER both!
  43. // 'roboto-font', // optional, you are not bound to it
  44. // 'material-icons' // optional, you are not bound to it
  45. ],
  46. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
  47. build: {
  48. target: {
  49. browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
  50. node: 'node16'
  51. },
  52. vueRouterMode: 'history', // available values: 'hash', 'history'
  53. // vueRouterBase,
  54. // vueDevtools,
  55. vueOptionsAPI: true,
  56. rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
  57. // publicPath: '/',
  58. // analyze: true,
  59. // env: {},
  60. // rawDefine: {}
  61. // ignorePublicFolder: true,
  62. // minify: false,
  63. // polyfillModulePreload: true,
  64. // distDir
  65. // extendViteConf (viteConf) {},
  66. // viteVuePluginOptions: {},
  67. vitePlugins: [
  68. ['@intlify/vite-plugin-vue-i18n', {
  69. // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
  70. // compositionOnly: false,
  71. // you need to set i18n resource including paths !
  72. include: path.resolve(__dirname, './src/i18n/locales/**')
  73. }]
  74. ]
  75. },
  76. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
  77. devServer: {
  78. // https: true
  79. open: false, // opens browser window automatically
  80. proxy: {
  81. '/_graphql': 'http://localhost:3000/graphql'
  82. }
  83. },
  84. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  85. framework: {
  86. config: {
  87. brand: {
  88. header: '#000',
  89. sidebar: '#1976D2'
  90. },
  91. loading: {
  92. delay: 500,
  93. spinner: 'QSpinnerGrid',
  94. spinnerSize: 32,
  95. spinnerColor: 'white'
  96. },
  97. loadingBar: {
  98. color: 'primary',
  99. size: '1px',
  100. position: 'top'
  101. },
  102. notify: {
  103. position: 'top',
  104. progress: true,
  105. color: 'green',
  106. icon: 'las la-check',
  107. actions: [
  108. {
  109. icon: 'las la-times',
  110. color: 'white',
  111. size: 'sm',
  112. round: true,
  113. handler: () => {}
  114. }
  115. ]
  116. }
  117. },
  118. iconSet: 'fontawesome-v6', // Quasar icon set
  119. lang: 'en-US', // Quasar language pack
  120. // For special cases outside of where the auto-import strategy can have an impact
  121. // (like functional components as one of the examples),
  122. // you can manually specify Quasar components/directives to be available everywhere:
  123. //
  124. // components: [],
  125. // directives: [],
  126. // Quasar plugins
  127. plugins: [
  128. 'Dialog',
  129. 'Loading',
  130. 'LoadingBar',
  131. 'Meta',
  132. 'Notify'
  133. ]
  134. },
  135. // animations: 'all', // --- includes all animations
  136. // https://v2.quasar.dev/options/animations
  137. animations: [],
  138. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  139. sourceFiles: {
  140. // rootComponent: 'src/App.vue',
  141. // router: 'src/router/index',
  142. store: 'src/stores/index'
  143. // registerServiceWorker: 'src-pwa/register-service-worker',
  144. // serviceWorker: 'src-pwa/custom-service-worker',
  145. // pwaManifestFile: 'src-pwa/manifest.json',
  146. // electronMain: 'src-electron/electron-main',
  147. // electronPreload: 'src-electron/electron-preload'
  148. },
  149. // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
  150. ssr: {
  151. // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
  152. // will mess up SSR
  153. // extendSSRWebserverConf (esbuildConf) {},
  154. // extendPackageJson (json) {},
  155. pwa: false,
  156. // manualStoreHydration: true,
  157. // manualPostHydrationTrigger: true,
  158. prodPort: 3000, // The default port that the production server should use
  159. // (gets superseded if process.env.PORT is specified at runtime)
  160. middlewares: [
  161. 'render' // keep this as last one
  162. ]
  163. },
  164. // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
  165. pwa: {
  166. workboxMode: 'generateSW', // or 'injectManifest'
  167. injectPwaMetaTags: true,
  168. swFilename: 'sw.js',
  169. manifestFilename: 'manifest.json',
  170. useCredentialsForManifestTag: false
  171. // extendGenerateSWOptions (cfg) {}
  172. // extendInjectManifestOptions (cfg) {},
  173. // extendManifestJson (json) {}
  174. // extendPWACustomSWConf (esbuildConf) {}
  175. },
  176. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
  177. electron: {
  178. // extendElectronMainConf (esbuildConf)
  179. // extendElectronPreloadConf (esbuildConf)
  180. inspectPort: 5858,
  181. bundler: 'packager', // 'packager' or 'builder'
  182. packager: {
  183. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  184. // OS X / Mac App Store
  185. // appBundleId: '',
  186. // appCategoryType: '',
  187. // osxSign: '',
  188. // protocol: 'myapp://path',
  189. // Windows only
  190. // win32metadata: { ... }
  191. },
  192. builder: {
  193. // https://www.electron.build/configuration/configuration
  194. appId: 'ux'
  195. }
  196. }
  197. }
  198. })