3
0

quasar.conf.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. 'QInput',
  38. 'QIcon',
  39. 'QSelect',
  40. 'QList',
  41. 'QItem',
  42. 'QItemSection',
  43. 'QItemLabel',
  44. 'QCard',
  45. 'QCardSection',
  46. 'QCardActions',
  47. 'QCarousel',
  48. 'QCarouselControl',
  49. 'QCarouselSlide',
  50. 'QSeparator',
  51. 'QAvatar'
  52. ],
  53. directives: [
  54. 'TouchSwipe',
  55. 'Ripple'
  56. ],
  57. // Quasar plugins
  58. plugins: [
  59. 'Notify'
  60. ]
  61. // iconSet: 'ionicons-v4'
  62. // lang: 'de' // Quasar language
  63. },
  64. supportIE: false,
  65. build: {
  66. env: ctx.dev
  67. ? { // so on dev we'll have
  68. API: JSON.stringify('http://1.117.158.212:10015/v1/')
  69. }
  70. : { // and on build (production):
  71. API: JSON.stringify('http://1.117.158.212:10015/v1/')
  72. },
  73. scopeHoisting: true,
  74. // vueRouterMode: 'history',
  75. // vueCompiler: true,
  76. // gzip: true,
  77. // analyze: true,
  78. // extractCSS: false,
  79. extendWebpack (cfg) {
  80. cfg.module.rules.push({
  81. enforce: 'pre',
  82. test: /\.(js|vue)$/,
  83. loader: 'eslint-loader',
  84. exclude: /node_modules/
  85. }),
  86. cfg.resolve.alias = {
  87. ...cfg.resolve.alias, // This adds the existing alias
  88. // Add you own alias like this
  89. '@': resolve('src')
  90. }
  91. }
  92. },
  93. devServer: {
  94. // https: true,
  95. // port: 8080,
  96. open: true // opens browser window automatically
  97. },
  98. // animations: 'all', // --- includes all animations
  99. animations: [],
  100. ssr: {
  101. pwa: false
  102. },
  103. pwa: {
  104. // workboxPluginMode: 'InjectManifest',
  105. // workboxOptions: {}, // only for NON InjectManifest
  106. manifest: {
  107. // name: 'Quasar App',
  108. // short_name: 'Quasar-PWA',
  109. // description: 'Best PWA App in town!',
  110. display: 'standalone',
  111. orientation: 'portrait',
  112. background_color: '#ffffff',
  113. theme_color: '#027be3',
  114. icons: [
  115. {
  116. 'src': 'statics/icons/icon-128x128.png',
  117. 'sizes': '128x128',
  118. 'type': 'image/png'
  119. },
  120. {
  121. 'src': 'statics/icons/icon-192x192.png',
  122. 'sizes': '192x192',
  123. 'type': 'image/png'
  124. },
  125. {
  126. 'src': 'statics/icons/icon-256x256.png',
  127. 'sizes': '256x256',
  128. 'type': 'image/png'
  129. },
  130. {
  131. 'src': 'statics/icons/icon-384x384.png',
  132. 'sizes': '384x384',
  133. 'type': 'image/png'
  134. },
  135. {
  136. 'src': 'statics/icons/icon-512x512.png',
  137. 'sizes': '512x512',
  138. 'type': 'image/png'
  139. }
  140. ]
  141. }
  142. },
  143. cordova: {
  144. // id: 'org.cordova.quasar.app'
  145. // noIosLegacyBuildFlag: true // uncomment only if you know what you are doing
  146. },
  147. electron: {
  148. // bundler: 'builder', // or 'packager'
  149. extendWebpack (cfg) {
  150. // do something with Electron main process Webpack cfg
  151. // chainWebpack also available besides this extendWebpack
  152. },
  153. packager: {
  154. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  155. // OS X / Mac App Store
  156. // appBundleId: '',
  157. // appCategoryType: '',
  158. // osxSign: '',
  159. // protocol: 'myapp://path',
  160. // Window only
  161. // win32metadata: { ... }
  162. },
  163. builder: {
  164. // https://www.electron.build/configuration/configuration
  165. // appId: 'quasar-app'
  166. }
  167. }
  168. }
  169. }