Newer
Older
operation_web / config / index.js
@zhangqy zhangqy on 19 Jan 2020 4 KB 介入瞿辉代码 状态控制
  1. 'use strict';
  2. // Template version: 1.3.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4.  
  5. const path = require('path')
  6.  
  7. module.exports = {
  8. dev: {
  9. // Paths
  10. assetsSubDirectory: 'static',
  11. assetsPublicPath: '/',
  12. proxyTable: {
  13. '/warnApi': {
  14. // 测试环境 黄加林
  15. 'target': 'http://192.168.30.205:8286', // 接口域名
  16. // 'target': 'http://192.168.30.30:8001/api', // 服务器接口
  17. 'changeOrigin': true, //是否跨域
  18. 'pathRewrite': {
  19. '^/warnApi': '' //需要rewrite重写的,
  20. }
  21. },
  22. '/Api': {
  23. // 测试环境 陈洪刚
  24. // 'target': 'http://192.168.30.189:8800', // 接口域名
  25. 'target': 'http://192.168.30.179:6099', // 陈红刚
  26. // 'target': 'http://192.168.30.30:8001/api', // 服务器接口
  27. 'changeOrigin': true, //是否跨域
  28. 'pathRewrite': {
  29. '^/Api': '' //需要rewrite重写的,
  30. }
  31. },
  32. '/dataApi': {
  33. // 测试环境 陈洪刚
  34. // 'target': 'http://192.168.30.189:8800', // 接口域名
  35. 'target': 'http://192.168.30.179:8282', // 陈红刚
  36. // 'target': 'http://192.168.30.30:8001/api', // 服务器接口
  37. 'changeOrigin': true, //是否跨域
  38. 'pathRewrite': {
  39. '^/dataApi': '' //需要rewrite重写的,
  40. }
  41. },
  42. '/led': {
  43. // 测试环境
  44. // 'target': 'http://192.168.30.189:8800', // 接口域名
  45. 'target': 'http://192.168.30.15:9209', // 谢阳
  46. // 'target': 'http://192.168.30.30:8001/api', // 服务器接口
  47. 'changeOrigin': true, //是否跨域
  48. 'pathRewrite': {
  49. '^/led': '' //需要rewrite重写的,
  50. }
  51. },
  52. '/NF': {
  53. // 测试环境
  54. 'target': 'http://47.97.26.236:6099', // 旧版新烽查询系统
  55. 'changeOrigin': true, //是否跨域
  56. 'pathRewrite': {
  57. '^/NF': '' //需要rewrite重写的,
  58. }
  59. },
  60. '/SJFX': {
  61. // 监测站点数据分析
  62. 'target': 'http://132.232.115.20:8889', // 接口域名
  63. 'changeOrigin': true, //是否跨域
  64. 'pathRewrite': {
  65. '^/SJFX': '' //需要rewrite重写的,
  66. }
  67. },
  68. '/ZhuangTaiJianKong': {
  69. // 监测站点数据分析
  70. 'target': 'http://139.155.49.237:8300', // 接口域名
  71. 'changeOrigin': true, //是否跨域
  72. 'pathRewrite': {
  73. '^/ZhuangTaiJianKong': '' //需要rewrite重写的,
  74. }
  75. },
  76. },
  77.  
  78. // Various Dev Server settings
  79. host: 'localhost', // can be overwritten by process.env.HOST
  80. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  81. autoOpenBrowser: true,
  82. errorOverlay: true,
  83. notifyOnErrors: true,
  84. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  85.  
  86.  
  87. /**
  88. * Source Maps
  89. */
  90.  
  91. // https://webpack.js.org/configuration/devtool/#development
  92. devtool: 'cheap-module-eval-source-map',
  93.  
  94. // If you have problems debugging vue-files in devtools,
  95. // set this to false - it *may* help
  96. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  97. cacheBusting: true,
  98.  
  99. cssSourceMap: true
  100. },
  101.  
  102. build: {
  103. // Template for index.html
  104. index: path.resolve(__dirname, '../dist/index.html'),
  105.  
  106. // Paths
  107. assetsRoot: path.resolve(__dirname, '../dist'),
  108. assetsSubDirectory: 'static',
  109. assetsPublicPath: '/',
  110.  
  111. /**
  112. * Source Maps
  113. */
  114.  
  115. productionSourceMap: true,
  116. // https://webpack.js.org/configuration/devtool/#production
  117. devtool: '#source-map',
  118.  
  119. // Gzip off by default as many popular static hosts such as
  120. // Surge or Netlify already gzip all static assets for you.
  121. // Before setting to `true`, make sure to:
  122. // npm install --save-dev compression-webpack-plugin
  123. productionGzip: false,
  124. productionGzipExtensions: ['js', 'css'],
  125.  
  126. // Run the build command with an extra argument to
  127. // View the bundle analyzer report after build finishes:
  128. // `npm run build --report`
  129. // Set to `true` or `false` to always turn it on or off
  130. bundleAnalyzerReport: process.env.npm_config_report
  131. }
  132. }