index.js 5.1 KB

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