index.js 3.7 KB

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