index.js 3.0 KB

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