quasar.config.js 6.5 KB

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