quasar.config.js 6.9 KB

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