index.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. '/api': {
  12. // target: 'http://10.8.0.3:8000', // 翟毅飞
  13. // target: 'http://192.168.1.77:8002', //曹世祥本地服务
  14. // target: 'http://192.168.1.20:8000', // 范玉虎本地服务
  15. target: 'http://192.168.2.132:8000', // 闫自林本地服务1
  16. // target: 'http://192.168.0.120:8006', //jiake
  17. // target: 'http://192.168.1.76:8000', //杨明明本地服务
  18. // target: 'http://192.168.2.183:8006', //孙加可本地服务
  19. // target: 'http://192.168.2.161:8003', // 闫自林本地服务2
  20. // target: 'http://8.136.98.49:8002', // 正式线上服务
  21. // target: 'http://hnyfwlw.com:8002', // 线上服务
  22. // target: 'http://47.110.79.22:9000', // 测试服务
  23. // target: 'https://web.hnyfwlw.com:58002', //线上服务
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^/api': '/api' // 重写接口
  27. }
  28. },
  29. '/shuLianApi': {
  30. target: 'http://8.136.98.49:58008', // 数联预警
  31. changeOrigin: true,
  32. pathRewrite: {
  33. '^/shuLianApi': '/api' // 重写接口
  34. }
  35. },
  36. '/search': {
  37. target: 'http://www.yfzhwlw.com', // 线上服务
  38. changeOrigin: true,
  39. pathRewrite: {
  40. '^/search': '/search' // 重写接口
  41. }
  42. },
  43. '/qxz_config': {
  44. target: 'http://192.168.2.157:8003', //
  45. // target: 'http://192.168.1.52:10001', //
  46. // target: 'http://192.168.0.36:8008', //
  47. changeOrigin: true,
  48. pathRewrite: {
  49. '^/qxzconfig': '/qxzconfig' // 重写接口
  50. }
  51. }
  52. },
  53. // Various Dev Server settings
  54. host: '0.0.0.0', // can be overwritten by process.env.HOST
  55. port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  56. // autoOpenBrowser: false,
  57. autoOpenBrowser: true,
  58. errorOverlay: true,
  59. notifyOnErrors: true,
  60. poll: false, // https://webpack.sjs.org/configuration/dev-server/#devserver-watchoptions-
  61. // Use Eslint Loader?
  62. // If true, your code will be linted during bundling and
  63. // linting errors and warnings will be shown in the console.
  64. useEslint: true,
  65. // If true, eslint errors and warnings will also be shown in the error overlay
  66. // in the browser.
  67. showEslintErrorsInOverlay: false,
  68. /**
  69. * Source Maps
  70. */
  71. // https://webpack.js.org/configuration/devtool/#development
  72. devtool: 'eval-source-map',
  73. // If you have problems debugging vue-files in devtools,
  74. // set this to false - it *may* help
  75. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  76. cacheBusting: true,
  77. cssSourceMap: true
  78. },
  79. build: {
  80. // Template for index.html
  81. index: path.resolve(__dirname, '../dist/index.html'),
  82. // F:\project\bigdata_vue_frond\dist
  83. // F:\project\bigdata_vue\product\bigdata2\dist
  84. // Paths
  85. assetsRoot: path.resolve(__dirname, '../dist'),
  86. assetsSubDirectory: 'static',
  87. assetsPublicPath: '/',
  88. /**
  89. * Source Maps
  90. */
  91. productionSourceMap: false,
  92. // https://webpack.js.org/configuration/devtool/#production
  93. devtool: '#source-map',
  94. // Gzip off by default as many popular static hosts such as
  95. // Surge or Netlify already gzip all static assets for you.
  96. // Before setting to `true`, make sure to:
  97. // npm install --save-dev compression-webpack-plugin
  98. productionGzip: true,
  99. productionGzipExtensions: ['js', 'css'],
  100. // Run the build command with an extra argument to
  101. // View the bundle analyzer report after build finishes:
  102. // `npm run build --report`
  103. // Set to `true` or `false` to always turn it on or off
  104. bundleAnalyzerReport: process.env.npm_config_report
  105. }
  106. };