index.js 4.5 KB

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