index.js 5.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. '/admin': {
  12. target: 'http://192.168.20.235:8080',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. "^/admin": "/"
  16. }
  17. },
  18. // '/api/datacenter/': {
  19. // target: 'http://192.168.20.179:8081',
  20. // changeOrigin: true,
  21. // pathRewrite: {
  22. // "^/api/datacenter": "/"
  23. // }
  24. // },
  25. '/api': {
  26. target: 'http://192.168.20.235:8080',
  27. changeOrigin: true,
  28. pathRewrite: {
  29. "^/api": "/"
  30. }
  31. },
  32. '/data-platform-3': {
  33. // 目标 API 地址
  34. target: 'http://192.168.20.225:8080/',
  35. // 如果要代理 websockets
  36. ws: true,
  37. // 将主机标头的原点更改为目标URL
  38. changeOrigin: false
  39. },
  40. '/business-space': {
  41. // 目标 API 地址
  42. target: 'http://192.168.20.225:8080/',
  43. // 如果要代理 websockets
  44. ws: true,
  45. // 将主机标头的原点更改为目标URL
  46. changeOrigin: false
  47. },
  48. '/pointconfig': {
  49. // 目标 API 地址
  50. target: 'http://192.168.20.235:8080/',
  51. // 如果要代理 websockets
  52. ws: true,
  53. // 将主机标头的原点更改为目标URL
  54. changeOrigin: false
  55. },
  56. '/venders-dp': {
  57. // 目标 API 地址
  58. target: 'http://192.168.20.225:8080/',
  59. // 如果要代理 websockets
  60. ws: true,
  61. // 将主机标头的原点更改为目标URL
  62. changeOrigin: false
  63. },
  64. '/venders': {
  65. // 目标 API 地址
  66. target: 'http://192.168.20.225:8080/',
  67. // 如果要代理 websockets
  68. ws: true,
  69. // 将主机标头的原点更改为目标URL
  70. changeOrigin: false
  71. },
  72. '/ScanBuilding': {
  73. // 目标 API 地址
  74. target: 'http://192.168.20.235:8080/',
  75. // 如果要代理 websockets
  76. ws: true,
  77. // 将主机标头的原点更改为目标URL
  78. changeOrigin: false
  79. },
  80. '/image-service': {
  81. // 目标 API 地址
  82. target: 'http://192.168.20.225:8080/',
  83. // 如果要代理 websockets
  84. ws: true,
  85. // 将主机标头的原点更改为目标URL
  86. changeOrigin: false
  87. },
  88. '/godhand': {
  89. // 目标 API 地址
  90. target: 'http://192.168.20.225:8080/',
  91. // 如果要代理 websockets
  92. ws: true,
  93. // 将主机标头的原点更改为目标URL
  94. changeOrigin: false
  95. },
  96. '/modelapi': {
  97. target: 'http://192.168.20.225:8082',
  98. changeOrigin: true,
  99. pathRewrite: {
  100. "^/modelapi": "/"
  101. }
  102. },
  103. '/messageapi': {
  104. target: 'http://192.168.20.153:8080',
  105. changeOrigin: true,
  106. pathRewrite: {
  107. "^/messageapi": "/"
  108. }
  109. },
  110. },
  111. // Various Dev Server settings
  112. host: '0.0.0.0', // can be overwritten by process.env.HOST
  113. port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  114. autoOpenBrowser: false,
  115. errorOverlay: true,
  116. notifyOnErrors: true,
  117. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  118. /**
  119. * Source Maps
  120. */
  121. // https://webpack.js.org/configuration/devtool/#development
  122. devtool: 'cheap-module-eval-source-map',
  123. // If you have problems debugging vue-files in devtools,
  124. // set this to false - it *may* help
  125. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  126. cacheBusting: true,
  127. cssSourceMap: true
  128. },
  129. build: {
  130. // Template for index.html
  131. index: path.resolve(__dirname, '../dist/index.html'),
  132. // Paths
  133. assetsRoot: path.resolve(__dirname, '../dist'),
  134. assetsSubDirectory: 'static',
  135. assetsPublicPath: '/',
  136. /**
  137. * Source Maps
  138. */
  139. productionSourceMap: true,
  140. // https://webpack.js.org/configuration/devtool/#production
  141. devtool: '#source-map',
  142. // Gzip off by default as many popular static hosts such as
  143. // Surge or Netlify already gzip all static assets for you.
  144. // Before setting to `true`, make sure to:
  145. // npm install --save-dev compression-webpack-plugin
  146. productionGzip: false,
  147. productionGzipExtensions: ['js', 'css'],
  148. // Run the build command with an extra argument to
  149. // View the bundle analyzer report after build finishes:
  150. // `npm run build --report`
  151. // Set to `true` or `false` to always turn it on or off
  152. bundleAnalyzerReport: process.env.npm_config_report
  153. }
  154. }