index.js 4.6 KB

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