index.js 3.3 KB

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