index.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. '/agentai': {
  12. // target: 'http://lq.lianqiai.cn:23001',
  13. target: 'https://ai.zrzyt.zj.gov.cn/agentai',
  14. changeOrigin: true,
  15. pathRewrite: {
  16. '^/agentai': ''
  17. }
  18. },
  19. '/lianqiai': {
  20. // target: 'http://lq.lianqiai.cn:23001',
  21. target: 'http://121.40.148.47:8520',
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/lianqiai': ''
  25. }
  26. },
  27. '/server': {
  28. // target: 'http://localhost:7506/llm',
  29. target: 'http://60.191.110.204:8510/server',
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^/server': ''
  33. }
  34. },
  35. '/arcserver-host': {
  36. target: 'http://60.191.110.204:6080', //对应服务器地址
  37. changeOrigin: true, //允许跨域
  38. ws: true,
  39. pathRewrite: {
  40. '^/arcserver-host': ''
  41. }
  42. },
  43. '/geoserver-host': {
  44. target: 'https://zdzy.zrzyt.zj.gov.cn', //对应服务器地址
  45. changeOrigin: true, //允许跨域
  46. ws: true,
  47. pathRewrite: {
  48. '^/geoserver-host': ''
  49. }
  50. },
  51. '/router-host': {
  52. target: 'http://api.tianditu.gov.cn', //对应服务器地址
  53. changeOrigin: true, //允许跨域
  54. ws: true,
  55. pathRewrite: {
  56. '^/router-host': ''
  57. }
  58. }
  59. },
  60. // Various Dev Server settings
  61. host: 'localhost', // can be overwritten by process.env.HOST
  62. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  63. autoOpenBrowser: false,
  64. errorOverlay: true,
  65. notifyOnErrors: true,
  66. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  67. /**
  68. * Source Maps
  69. */
  70. // https://webpack.js.org/configuration/devtool/#development
  71. devtool: 'cheap-module-eval-source-map',
  72. // If you have problems debugging vue-files in devtools,
  73. // set this to false - it *may* help
  74. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  75. cacheBusting: true,
  76. cssSourceMap: true
  77. },
  78. build: {
  79. // Template for index.html
  80. index: path.resolve(__dirname, '../dist/index.html'),
  81. // Paths
  82. assetsRoot: path.resolve(__dirname, '../dist'),
  83. assetsSubDirectory: 'static',
  84. assetsPublicPath: './',
  85. /**
  86. * Source Maps
  87. */
  88. productionSourceMap: false,
  89. // https://webpack.js.org/configuration/devtool/#production
  90. devtool: '#source-map',
  91. // Gzip off by default as many popular static hosts such as
  92. // Surge or Netlify already gzip all static assets for you.
  93. // Before setting to `true`, make sure to:
  94. // npm install --save-dev compression-webpack-plugin
  95. productionGzip: false,
  96. productionGzipExtensions: ['js', 'css'],
  97. // Run the build command with an extra argument to
  98. // View the bundle analyzer report after build finishes:
  99. // `npm run build --report`
  100. // Set to `true` or `false` to always turn it on or off
  101. bundleAnalyzerReport: process.env.npm_config_report
  102. }
  103. }