index.js 7.8 KB

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