quasar.conf.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. // Configuration for your app
  2. const path = require('path')
  3. function resolve (dir) {
  4. return path.join(__dirname, '.', dir)
  5. }
  6. module.exports = function (ctx) {
  7. return {
  8. // app boot file (/src/boot)
  9. // --> boot files are part of "main.js"
  10. boot: [
  11. 'axios',
  12. 'v-charts'
  13. ],
  14. css: [
  15. 'app.styl'
  16. ],
  17. extras: [
  18. 'roboto-font',
  19. 'material-icons' // optional, you are not bound to it
  20. // 'ionicons-v4',
  21. // 'mdi-v3',
  22. // 'fontawesome-v5',
  23. // 'eva-icons'
  24. ],
  25. framework: {
  26. // all: true, // --- includes everything; for dev only!
  27. components: [
  28. 'QPagination',
  29. 'QLayout',
  30. 'QHeader',
  31. 'QDrawer',
  32. 'QPageContainer',
  33. 'QPage',
  34. 'QToolbar',
  35. 'QToolbarTitle',
  36. 'QBtn',
  37. 'QTable',
  38. 'QTh',
  39. 'QTr',
  40. 'QTd',
  41. 'QIcon',
  42. 'QList',
  43. 'QItem',
  44. 'QItemSection',
  45. 'QBtnDropdown',
  46. 'QItemLabel',
  47. 'QCard',
  48. 'QCardSection',
  49. 'QCardActions',
  50. 'QCarousel',
  51. 'QCarouselControl',
  52. 'QCarouselSlide',
  53. 'QSeparator',
  54. 'QAvatar'
  55. ],
  56. directives: [
  57. 'TouchSwipe',
  58. 'Ripple'
  59. ],
  60. // Quasar plugins
  61. plugins: [
  62. 'Notify'
  63. ]
  64. // iconSet: 'ionicons-v4'
  65. // lang: 'de' // Quasar language
  66. },
  67. supportIE: false,
  68. build: {
  69. env: ctx.dev
  70. ? { // so on dev we'll have
  71. API: JSON.stringify('http://39.98.34.197:20006/api')
  72. // API: JSON.stringify('http://47.92.238.200:8022')
  73. }
  74. : { // and on build (production):
  75. API: JSON.stringify('http://39.98.34.197:20006/api')
  76. },
  77. scopeHoisting: true,
  78. // vueRouterMode: 'history',
  79. // vueCompiler: true,
  80. // gzip: true,
  81. // analyze: true,
  82. // extractCSS: false,
  83. extendWebpack (cfg) {
  84. cfg.module.rules.push({
  85. enforce: 'pre',
  86. test: /\.(js|vue)$/,
  87. loader: 'eslint-loader',
  88. exclude: /node_modules/
  89. }),
  90. cfg.resolve.alias = {
  91. ...cfg.resolve.alias, // This adds the existing alias
  92. // Add you own alias like this
  93. '@': resolve('src')
  94. }
  95. }
  96. },
  97. devServer: {
  98. // https: true,
  99. // port: 8080,
  100. open: true // opens browser window automatically
  101. },
  102. // animations: 'all', // --- includes all animations
  103. animations: [],
  104. ssr: {
  105. pwa: false
  106. },
  107. pwa: {
  108. // workboxPluginMode: 'InjectManifest',
  109. // workboxOptions: {}, // only for NON InjectManifest
  110. manifest: {
  111. // name: 'Quasar App',
  112. // short_name: 'Quasar-PWA',
  113. // description: 'Best PWA App in town!',
  114. display: 'standalone',
  115. orientation: 'portrait',
  116. background_color: '#ffffff',
  117. theme_color: '#027be3',
  118. icons: [
  119. {
  120. 'src': 'statics/icons/icon-128x128.png',
  121. 'sizes': '128x128',
  122. 'type': 'image/png'
  123. },
  124. {
  125. 'src': 'statics/icons/icon-192x192.png',
  126. 'sizes': '192x192',
  127. 'type': 'image/png'
  128. },
  129. {
  130. 'src': 'statics/icons/icon-256x256.png',
  131. 'sizes': '256x256',
  132. 'type': 'image/png'
  133. },
  134. {
  135. 'src': 'statics/icons/icon-384x384.png',
  136. 'sizes': '384x384',
  137. 'type': 'image/png'
  138. },
  139. {
  140. 'src': 'statics/icons/icon-512x512.png',
  141. 'sizes': '512x512',
  142. 'type': 'image/png'
  143. }
  144. ]
  145. }
  146. },
  147. cordova: {
  148. // id: 'org.cordova.quasar.app'
  149. // noIosLegacyBuildFlag: true // uncomment only if you know what you are doing
  150. },
  151. electron: {
  152. // bundler: 'builder', // or 'packager'
  153. extendWebpack (cfg) {
  154. // do something with Electron main process Webpack cfg
  155. // chainWebpack also available besides this extendWebpack
  156. },
  157. packager: {
  158. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  159. // OS X / Mac App Store
  160. // appBundleId: '',
  161. // appCategoryType: '',
  162. // osxSign: '',
  163. // protocol: 'myapp://path',
  164. // Window only
  165. // win32metadata: { ... }
  166. },
  167. builder: {
  168. // https://www.electron.build/configuration/configuration
  169. // appId: 'quasar-app'
  170. }
  171. }
  172. }
  173. }