quasar.config.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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. 'i18n'
  28. ],
  29. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
  30. css: [
  31. 'app.scss'
  32. ],
  33. // https://github.com/quasarframework/quasar/tree/dev/extras
  34. extras: [
  35. // 'ionicons-v4',
  36. // 'mdi-v5',
  37. 'fontawesome-v6',
  38. // 'eva-icons',
  39. // 'themify',
  40. 'line-awesome',
  41. 'roboto-font-latin-ext' // this or either 'roboto-font', NEVER both!
  42. // 'roboto-font', // optional, you are not bound to it
  43. // 'material-icons' // optional, you are not bound to it
  44. ],
  45. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
  46. build: {
  47. target: {
  48. browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
  49. node: 'node16'
  50. },
  51. vueRouterMode: 'history', // available values: 'hash', 'history'
  52. // vueRouterBase,
  53. // vueDevtools,
  54. vueOptionsAPI: true,
  55. rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
  56. // publicPath: '/',
  57. // analyze: true,
  58. // env: {},
  59. // rawDefine: {}
  60. // ignorePublicFolder: true,
  61. // minify: false,
  62. // polyfillModulePreload: true,
  63. // distDir
  64. // extendViteConf (viteConf) {},
  65. // viteVuePluginOptions: {},
  66. vitePlugins: [
  67. ['@intlify/vite-plugin-vue-i18n', {
  68. // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
  69. // compositionOnly: false,
  70. // you need to set i18n resource including paths !
  71. include: path.resolve(__dirname, './src/i18n/locales/**')
  72. }]
  73. ]
  74. },
  75. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
  76. devServer: {
  77. // https: true
  78. open: false, // opens browser window automatically
  79. proxy: {
  80. '/_graphql': 'http://localhost:3000/graphql'
  81. }
  82. },
  83. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  84. framework: {
  85. config: {
  86. brand: {
  87. header: '#000',
  88. sidebar: '#1976D2'
  89. },
  90. loading: {
  91. delay: 500,
  92. spinner: 'QSpinnerGrid',
  93. spinnerSize: 32,
  94. spinnerColor: 'white'
  95. },
  96. loadingBar: {
  97. color: 'primary',
  98. size: '1px',
  99. position: 'top'
  100. },
  101. notify: {
  102. position: 'top',
  103. progress: true,
  104. color: 'green',
  105. icon: 'las la-check',
  106. actions: [
  107. {
  108. icon: 'las la-times',
  109. color: 'white',
  110. size: 'sm',
  111. round: true,
  112. handler: () => {}
  113. }
  114. ]
  115. }
  116. },
  117. iconSet: 'fontawesome-v6', // Quasar icon set
  118. lang: 'en-US', // Quasar language pack
  119. // For special cases outside of where the auto-import strategy can have an impact
  120. // (like functional components as one of the examples),
  121. // you can manually specify Quasar components/directives to be available everywhere:
  122. //
  123. // components: [],
  124. // directives: [],
  125. // Quasar plugins
  126. plugins: [
  127. 'Dialog',
  128. 'Loading',
  129. 'LoadingBar',
  130. 'Meta',
  131. 'Notify'
  132. ]
  133. },
  134. // animations: 'all', // --- includes all animations
  135. // https://v2.quasar.dev/options/animations
  136. animations: [],
  137. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  138. sourceFiles: {
  139. // rootComponent: 'src/App.vue',
  140. // router: 'src/router/index',
  141. store: 'src/stores/index'
  142. // registerServiceWorker: 'src-pwa/register-service-worker',
  143. // serviceWorker: 'src-pwa/custom-service-worker',
  144. // pwaManifestFile: 'src-pwa/manifest.json',
  145. // electronMain: 'src-electron/electron-main',
  146. // electronPreload: 'src-electron/electron-preload'
  147. },
  148. // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
  149. ssr: {
  150. // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
  151. // will mess up SSR
  152. // extendSSRWebserverConf (esbuildConf) {},
  153. // extendPackageJson (json) {},
  154. pwa: false,
  155. // manualStoreHydration: true,
  156. // manualPostHydrationTrigger: true,
  157. prodPort: 3000, // The default port that the production server should use
  158. // (gets superseded if process.env.PORT is specified at runtime)
  159. middlewares: [
  160. 'render' // keep this as last one
  161. ]
  162. },
  163. // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
  164. pwa: {
  165. workboxMode: 'generateSW', // or 'injectManifest'
  166. injectPwaMetaTags: true,
  167. swFilename: 'sw.js',
  168. manifestFilename: 'manifest.json',
  169. useCredentialsForManifestTag: false
  170. // extendGenerateSWOptions (cfg) {}
  171. // extendInjectManifestOptions (cfg) {},
  172. // extendManifestJson (json) {}
  173. // extendPWACustomSWConf (esbuildConf) {}
  174. },
  175. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
  176. electron: {
  177. // extendElectronMainConf (esbuildConf)
  178. // extendElectronPreloadConf (esbuildConf)
  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: 'ux'
  194. }
  195. }
  196. }
  197. })