index.js 7.2 KB

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