quasar.conf.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // Configuration for your app
  2. const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
  3. const NormalModuleReplacementPlugin = require('webpack').NormalModuleReplacementPlugin
  4. module.exports = function (ctx) {
  5. return {
  6. // app plugins (/src/plugins)
  7. plugins: [
  8. 'vuex', 'schild'
  9. ],
  10. css: [
  11. 'app.styl'
  12. ],
  13. extras: [
  14. ctx.theme.mat ? 'roboto-font' : null,
  15. 'material-icons'
  16. // 'ionicons',
  17. // 'mdi',
  18. // 'fontawesome'
  19. ],
  20. supportIE: false,
  21. build: {
  22. scopeHoisting: true,
  23. vueRouterMode: 'history',
  24. // env: { HOST: JSON.stringify('http://192.168.178.27:8641') },
  25. // gzip: true,
  26. // analyze: true,
  27. // extractCSS: false,
  28. // useNotifier: false,
  29. extendWebpack (cfg) {
  30. cfg.devtool = 'eval'
  31. cfg.plugins.push(new UglifyJsPlugin({uglifyOptions: {mangle: false}}))
  32. cfg.plugins.push(new NormalModuleReplacementPlugin(/\.\.\/migrate/, '../util/noop.js'))
  33. cfg.plugins.push(new NormalModuleReplacementPlugin(/\.\.\/seed/, '../util/noop.js'))
  34. cfg.module.rules.push({
  35. enforce: 'pre',
  36. test: /\.(js|vue)$/,
  37. loader: 'eslint-loader',
  38. exclude: /(node_modules|quasar|dist|plugins)/
  39. })
  40. cfg.module.noParse = /require-wrapper/
  41. cfg.externals = {
  42. 'sqlite3': 'sqlite3',
  43. 'mariasql': 'mariasql',
  44. 'mssql': 'mssql',
  45. 'mysql2': 'mysql2',
  46. 'oracle': 'oracle',
  47. 'strong-oracle': 'strong-oracle',
  48. 'oracledb': 'oracledb',
  49. 'pg': 'pg',
  50. 'pg-query-stream': 'pg-query-stream'
  51. }
  52. }
  53. },
  54. devServer: {
  55. // https: true,
  56. // port: 8080,
  57. open: false // opens browser window automatically
  58. },
  59. // framework: 'all' --- includes everything; for dev only!
  60. framework: {
  61. components: [
  62. 'QAutocomplete',
  63. 'QLayout',
  64. 'QLayoutHeader',
  65. 'QLayoutDrawer',
  66. 'QPageContainer',
  67. 'QPage',
  68. 'QProgress',
  69. 'QSearch',
  70. 'QTable',
  71. 'QTh',
  72. 'QTr',
  73. 'QTd',
  74. 'QTableColumns',
  75. 'QToolbar',
  76. 'QToolbarTitle',
  77. 'QTooltip',
  78. 'QBtn',
  79. 'QIcon',
  80. 'QInput',
  81. 'QCheckbox',
  82. 'QList',
  83. 'QListHeader',
  84. 'QItem',
  85. 'QItemMain',
  86. 'QItemSide',
  87. 'QItemTile',
  88. 'QCard',
  89. 'QCardTitle',
  90. 'QCardMain',
  91. 'QCardSeparator',
  92. 'QFab',
  93. 'QFabAction',
  94. 'QPageSticky',
  95. 'QBreadcrumbs',
  96. 'QBreadcrumbsEl'
  97. ],
  98. directives: [
  99. 'Ripple'
  100. ],
  101. // Quasar plugins
  102. plugins: [
  103. 'Notify',
  104. 'Loading'
  105. ]
  106. },
  107. // animations: 'all' --- includes all animations
  108. animations: [
  109. ],
  110. pwa: {
  111. cacheExt: 'js,html,css,ttf,eot,otf,woff,woff2,json,svg,gif,jpg,jpeg,png,wav,ogg,webm,flac,aac,mp4,mp3',
  112. manifest: {
  113. // name: 'Quasar App',
  114. // short_name: 'Quasar-PWA',
  115. // description: 'Best PWA App in town!',
  116. display: 'standalone',
  117. orientation: 'portrait',
  118. background_color: '#ffffff',
  119. theme_color: '#027be3',
  120. icons: [
  121. {
  122. 'src': 'statics/icons/icon-128x128.png',
  123. 'sizes': '128x128',
  124. 'type': 'image/png'
  125. },
  126. {
  127. 'src': 'statics/icons/icon-192x192.png',
  128. 'sizes': '192x192',
  129. 'type': 'image/png'
  130. },
  131. {
  132. 'src': 'statics/icons/icon-256x256.png',
  133. 'sizes': '256x256',
  134. 'type': 'image/png'
  135. },
  136. {
  137. 'src': 'statics/icons/icon-384x384.png',
  138. 'sizes': '384x384',
  139. 'type': 'image/png'
  140. },
  141. {
  142. 'src': 'statics/icons/icon-512x512.png',
  143. 'sizes': '512x512',
  144. 'type': 'image/png'
  145. }
  146. ]
  147. }
  148. },
  149. cordova: {
  150. // id: 'org.cordova.quasar.app'
  151. },
  152. electron: {
  153. extendWebpack (cfg) {
  154. // do something with cfg
  155. },
  156. packager: {
  157. asar: true
  158. // OS X / Mac App Store
  159. // appBundleId: '',
  160. // appCategoryType: '',
  161. // osxSign: '',
  162. // protocol: 'myapp://path',
  163. // Window only
  164. // win32metadata: { ... }
  165. }
  166. },
  167. // leave this here for Quasar CLI
  168. starterKit: '1.0.0'
  169. }
  170. }