index.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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.64.14:8080/',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. "^/admin": "/"
  16. }
  17. },
  18. '/api': {
  19. // target: 'http://192.168.64.14:8080/',
  20. target: 'http://60.205.177.43:28888/',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. "^/api": "/"
  24. }
  25. },
  26. '/data-platform-3': {
  27. // 目标 API 地址
  28. target: 'http://39.97.179.199:9909/',
  29. // 如果要代理 websockets
  30. ws: true,
  31. // 将主机标头的原点更改为目标URL
  32. changeOrigin: false
  33. },
  34. '/business-space': {
  35. // 目标 API 地址
  36. target: 'http://39.97.179.199:9909',
  37. changeOrigin: true
  38. },
  39. '/pointconfig': {
  40. // 目标 API 地址
  41. target: ' http://192.168.64.14:8080/',
  42. // 如果要代理 websockets
  43. ws: true,
  44. // 将主机标头的原点更改为目标URL
  45. changeOrigin: false
  46. },
  47. '/venders-dp': {
  48. // 目标 API 地址
  49. target: 'http://39.97.179.199:9909',
  50. changeOrigin: true,
  51. // pathRewrite: {
  52. // "^/venders-dp": "/dp-auxiliary/venders-dp/"
  53. // }
  54. },
  55. '/venders': {
  56. // 目标 API 地址
  57. target: 'http://39.97.179.199:9909',
  58. changeOrigin: true,
  59. // pathRewrite: {
  60. // "^/venders": "/dp-auxiliary/venders/"
  61. // }
  62. },
  63. '/ScanBuilding': {
  64. // 目标 API 地址
  65. target: ' http://192.168.64.14:8080/',
  66. // 如果要代理 websockets
  67. ws: true,
  68. // 将主机标头的原点更改为目标URL
  69. changeOrigin: false
  70. },
  71. '/scanbuilding-2': {
  72. // 目标 API 地址
  73. target: ' http://192.168.64.14:8080/',
  74. // 如果要代理 websockets
  75. ws: true,
  76. // 将主机标头的原点更改为目标URL
  77. changeOrigin: false
  78. },
  79. '/image-service': {
  80. // 目标 API 地址
  81. target: 'http://39.97.179.199:8891',
  82. changeOrigin: true,
  83. pathRewrite: {
  84. "^/image-service": "/image-service/"
  85. }
  86. },
  87. '/modelapi': {
  88. target: ' http://192.168.64.14:8080/',
  89. changeOrigin: true,
  90. pathRewrite: {
  91. "^/modelapi": "/revit-algorithm/"
  92. }
  93. },
  94. '/schedulerapi': {
  95. target: ' http://192.168.64.14:8080/',
  96. changeOrigin: true,
  97. pathRewrite: {
  98. "^/schedulerapi": "/scheduler/"
  99. }
  100. },
  101. },
  102. // proxyTable: {
  103. // '/admin': {
  104. // target: 'http://172.16.44.235:8080',
  105. // changeOrigin: true,
  106. // pathRewrite: {
  107. // "^/admin": "/"
  108. // }
  109. // },
  110. // '/api': {
  111. // target: 'http://172.16.44.235:8080',
  112. // changeOrigin: true,
  113. // pathRewrite: {
  114. // "^/api": "/"
  115. // }
  116. // },
  117. // '/data-platform-3': {
  118. // // 目标 API 地址
  119. // target: 'http://172.16.42.210:8080/',
  120. // // 如果要代理 websockets
  121. // ws: true,
  122. // // 将主机标头的原点更改为目标URL
  123. // changeOrigin: false
  124. // },
  125. // '/business-space': {
  126. // // 目标 API 地址
  127. // target: 'http://172.16.42.210:8080/',
  128. // // 如果要代理 websockets
  129. // ws: true,
  130. // // 将主机标头的原点更改为目标URL
  131. // changeOrigin: false
  132. // },
  133. // '/pointconfig': {
  134. // // 目标 API 地址
  135. // target: 'http://172.16.44.235:8080/',
  136. // // 如果要代理 websockets
  137. // ws: true,
  138. // // 将主机标头的原点更改为目标URL
  139. // changeOrigin: false
  140. // },
  141. // '/venders-dp': {
  142. // // 目标 API 地址
  143. // target: 'http://172.16.42.210:8080/',
  144. // // 如果要代理 websockets
  145. // ws: true,
  146. // // 将主机标头的原点更改为目标URL
  147. // changeOrigin: false
  148. // },
  149. // '/venders': {
  150. // // 目标 API 地址
  151. // target: 'http://172.16.42.210:8080/',
  152. // // 如果要代理 websockets
  153. // ws: true,
  154. // // 将主机标头的原点更改为目标URL
  155. // changeOrigin: false
  156. // },
  157. // '/ScanBuilding': {
  158. // // 目标 API 地址
  159. // target: 'http://172.16.44.235:8080/',
  160. // // 如果要代理 websockets
  161. // ws: true,
  162. // // 将主机标头的原点更改为目标URL
  163. // changeOrigin: false
  164. // },
  165. // '/scanbuilding-2': {
  166. // // 目标 API 地址
  167. // target: ' http://192.168.64.14:8080//',
  168. // // 如果要代理 websockets
  169. // ws: true,
  170. // // 将主机标头的原点更改为目标URL
  171. // changeOrigin: false
  172. // },
  173. // '/image-service': {
  174. // // 目标 API 地址
  175. // target: 'http://172.16.42.210:8080/',
  176. // // 如果要代理 websockets
  177. // ws: true,
  178. // // 将主机标头的原点更改为目标URL
  179. // changeOrigin: false
  180. // },
  181. // '/modelapi': {
  182. // target: 'http://172.16.42.210:8082',
  183. // // target: 'http://192.168.20.218:8082',//景灏
  184. // changeOrigin: true,
  185. // pathRewrite: {
  186. // "^/modelapi": "/"
  187. // }
  188. // },
  189. // '/schedulerapi': {
  190. // target: 'http://172.16.42.210:8081',
  191. // changeOrigin: true,
  192. // pathRewrite: {
  193. // "^/schedulerapi": "/"
  194. // }
  195. // },
  196. // },
  197. // Various Dev Server settings
  198. host: '0.0.0.0', // can be overwritten by process.env.HOST
  199. port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  200. autoOpenBrowser: false,
  201. errorOverlay: true,
  202. notifyOnErrors: true,
  203. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  204. /**
  205. * Source Maps
  206. */
  207. // https://webpack.js.org/configuration/devtool/#development
  208. devtool: 'cheap-module-eval-source-map',
  209. // If you have problems debugging vue-files in devtools,
  210. // set this to false - it *may* help
  211. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  212. cacheBusting: true,
  213. cssSourceMap: true
  214. },
  215. build: {
  216. // Template for index.html
  217. index: path.resolve(__dirname, '../dist/index.html'),
  218. // Paths
  219. assetsRoot: path.resolve(__dirname, '../dist'),
  220. assetsSubDirectory: 'static',
  221. assetsPublicPath: '/',
  222. /**
  223. * Source Maps
  224. */
  225. productionSourceMap: true,
  226. // https://webpack.js.org/configuration/devtool/#production
  227. devtool: '#source-map',
  228. // Gzip off by default as many popular static hosts such as
  229. // Surge or Netlify already gzip all static assets for you.
  230. // Before setting to `true`, make sure to:
  231. // npm install --save-dev compression-webpack-plugin
  232. productionGzip: false,
  233. productionGzipExtensions: ['js', 'css'],
  234. // Run the build command with an extra argument to
  235. // View the bundle analyzer report after build finishes:
  236. // `npm run build --report`
  237. // Set to `true` or `false` to always turn it on or off
  238. bundleAnalyzerReport: process.env.npm_config_report
  239. }
  240. }