index.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. 'use strict'
  2. // Template version: 1.3.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. module.exports = {
  6. dev: {
  7. // Paths
  8. assetsSubDirectory: 'static',
  9. assetsPublicPath: '/',
  10. proxyTable: {
  11. '/onemap': {
  12. target: 'http://60.191.110.206:48014/onemap/',
  13. // target: 'http://localhost:8802/onemap/',
  14. changeOrigin: true,
  15. pathRewrite: {
  16. '^/onemap': ''
  17. }
  18. },
  19. '/prod-api': {
  20. target: 'http://localhost:8085/',
  21. // target: 'http://60.191.110.206:48014/prod-api/',
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/prod-api': ''
  25. }
  26. },
  27. '/back': {
  28. target: 'http://localhost:8807/',
  29. changeOrigin: true,
  30. pathRewrite: {
  31. '^/back': ''
  32. }
  33. },
  34. '/camera': {
  35. target: 'http://10.1.1.110:1082/web/open/api/v1/res/camera/',
  36. changeOrigin: true,
  37. pathRewrite: {
  38. '^/camera': ''
  39. }
  40. },
  41. '/wisdomcenter': {
  42. target: 'http://localhost:8805/wisdomcenter/',
  43. changeOrigin: true,
  44. pathRewrite: {
  45. '^/wisdomcenter': ''
  46. }
  47. },
  48. '/arcserver_host': {
  49. // target: 'http://60.191.110.206:48029',
  50. // target: 'http://localhost:6080/',
  51. target: 'http://10.101.37.25:6080',
  52. // target: 'http://2.20.12.108:8080/arcserver_host/',
  53. changeOrigin: true,
  54. pathRewrite: {
  55. '^/arcserver_host': ''
  56. }
  57. },
  58. '/arcgis_host': {
  59. target: 'http://60.191.110.206:36080/',
  60. // target: 'http://10.101.37.25:6080',
  61. // target: 'http://2.20.12.108:8080/arcgis_host/',
  62. // target: 'http://localhost:6080/',
  63. changeOrigin: true,
  64. pathRewrite: {
  65. '^/arcgis_host': ''
  66. }
  67. },
  68. '/3dHost': {
  69. // target: 'http://60.191.110.206:48014/3dHost',
  70. target: 'http://localhost:3001/',
  71. changeOrigin: false,
  72. pathRewrite: {
  73. '^/3dHost': ''
  74. }
  75. },
  76. '/quartz': {
  77. target: 'http://10.101.37.13:9051/',
  78. changeOrigin: false,
  79. pathRewrite: {
  80. '^/quartz': ''
  81. }
  82. },
  83. '/LoginApi': {
  84. target: 'http://114.215.200.79:6030/LoginApi/',
  85. changeOrigin: false,
  86. pathRewrite: {
  87. '^/LoginApi': ''
  88. }
  89. },
  90. '/analyse': {
  91. target: 'http://10.101.37.13:8882/Analysis.svc/',
  92. changeOrigin: false,
  93. pathRewrite: {
  94. '^/analyse': ''
  95. }
  96. },
  97. '/socket': {
  98. //webSocket代理
  99. target: 'ws://10.101.37.13:9050/socket', // 内网
  100. /*target: 'ws://你的服务器地址/parkingServer', // 外网*/
  101. /*target: 'ws://你的服务器地址/parkingServer',//本地测试*/
  102. ws:true,//开启ws, 如果是http代理此处可以不用设置
  103. changeOrigin: true,
  104. pathRewrite: {
  105. '^/socket': '/'
  106. }
  107. },
  108. },
  109. // Various Dev Server settings
  110. host: '0.0.0.0', // can be overwritten by process.env.HOST
  111. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  112. autoOpenBrowser: false,
  113. errorOverlay: true,
  114. notifyOnErrors: true,
  115. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  116. /**
  117. * Source Maps
  118. */
  119. // https://webpack.js.org/configuration/devtool/#development
  120. devtool: 'cheap-module-eval-source-map',
  121. // If you have problems debugging vue-files in devtools,
  122. // set this to false - it *may* help
  123. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  124. cacheBusting: true,
  125. cssSourceMap: true
  126. },
  127. build: {
  128. // Template for index.html
  129. index: path.resolve(__dirname, '../dist/index.html'),
  130. // Paths
  131. assetsRoot: path.resolve(__dirname, '../dist'),
  132. assetsSubDirectory: 'static',
  133. assetsPublicPath: '/',
  134. /**
  135. * Source Maps
  136. */
  137. productionSourceMap: true,
  138. // https://webpack.js.org/configuration/devtool/#production
  139. devtool: '#source-map',
  140. // Gzip off by default as many popular static hosts such as
  141. // Surge or Netlify already gzip all static assets for you.
  142. // Before setting to `true`, make sure to:
  143. // npm install --save-dev compression-webpack-plugin
  144. productionGzip: true,
  145. productionGzipExtensions: ['js', 'css'],
  146. // Run the build command with an extra argument to
  147. // View the bundle analyzer report after build finishes:
  148. // `npm run build --report`
  149. // Set to `true` or `false` to always turn it on or off
  150. bundleAnalyzerReport: process.env.npm_config_report
  151. }
  152. }