quasar.config.js 6.5 KB

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