quasar.config.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. port: 3001,
  81. proxy: {
  82. '/_graphql': 'http://localhost:3000/graphql'
  83. }
  84. },
  85. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  86. framework: {
  87. config: {
  88. brand: {
  89. header: '#000',
  90. sidebar: '#1976D2'
  91. },
  92. loading: {
  93. delay: 500,
  94. spinner: 'QSpinnerGrid',
  95. spinnerSize: 32,
  96. spinnerColor: 'white'
  97. },
  98. loadingBar: {
  99. color: 'primary',
  100. size: '1px',
  101. position: 'top'
  102. },
  103. notify: {
  104. position: 'top',
  105. progress: true,
  106. color: 'green',
  107. icon: 'las la-check',
  108. actions: [
  109. {
  110. icon: 'las la-times',
  111. color: 'white',
  112. size: 'sm',
  113. round: true,
  114. handler: () => {}
  115. }
  116. ]
  117. }
  118. },
  119. iconSet: 'fontawesome-v6', // Quasar icon set
  120. lang: 'en-US', // Quasar language pack
  121. // For special cases outside of where the auto-import strategy can have an impact
  122. // (like functional components as one of the examples),
  123. // you can manually specify Quasar components/directives to be available everywhere:
  124. //
  125. // components: [],
  126. // directives: [],
  127. // Quasar plugins
  128. plugins: [
  129. 'Dialog',
  130. 'Loading',
  131. 'LoadingBar',
  132. 'Meta',
  133. 'Notify'
  134. ]
  135. },
  136. // animations: 'all', // --- includes all animations
  137. // https://v2.quasar.dev/options/animations
  138. animations: [],
  139. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  140. sourceFiles: {
  141. // rootComponent: 'src/App.vue',
  142. // router: 'src/router/index',
  143. store: 'src/stores/index'
  144. // registerServiceWorker: 'src-pwa/register-service-worker',
  145. // serviceWorker: 'src-pwa/custom-service-worker',
  146. // pwaManifestFile: 'src-pwa/manifest.json',
  147. // electronMain: 'src-electron/electron-main',
  148. // electronPreload: 'src-electron/electron-preload'
  149. },
  150. // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
  151. ssr: {
  152. // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
  153. // will mess up SSR
  154. // extendSSRWebserverConf (esbuildConf) {},
  155. // extendPackageJson (json) {},
  156. pwa: false,
  157. // manualStoreHydration: true,
  158. // manualPostHydrationTrigger: true,
  159. prodPort: 3000, // The default port that the production server should use
  160. // (gets superseded if process.env.PORT is specified at runtime)
  161. middlewares: [
  162. 'render' // keep this as last one
  163. ]
  164. },
  165. // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
  166. pwa: {
  167. workboxMode: 'generateSW', // or 'injectManifest'
  168. injectPwaMetaTags: true,
  169. swFilename: 'sw.js',
  170. manifestFilename: 'manifest.json',
  171. useCredentialsForManifestTag: false
  172. // extendGenerateSWOptions (cfg) {}
  173. // extendInjectManifestOptions (cfg) {},
  174. // extendManifestJson (json) {}
  175. // extendPWACustomSWConf (esbuildConf) {}
  176. },
  177. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
  178. electron: {
  179. // extendElectronMainConf (esbuildConf)
  180. // extendElectronPreloadConf (esbuildConf)
  181. inspectPort: 5858,
  182. bundler: 'packager', // 'packager' or 'builder'
  183. packager: {
  184. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  185. // OS X / Mac App Store
  186. // appBundleId: '',
  187. // appCategoryType: '',
  188. // osxSign: '',
  189. // protocol: 'myapp://path',
  190. // Windows only
  191. // win32metadata: { ... }
  192. },
  193. builder: {
  194. // https://www.electron.build/configuration/configuration
  195. appId: 'ux'
  196. }
  197. }
  198. }
  199. })