农经大屏
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

54 строки
2.0 KiB

  1. module.exports = {
  2. css: {
  3. loaderOptions: {
  4. }
  5. },
  6. configureWebpack: {
  7. performance: {
  8. hints: false
  9. },
  10. devServer: {
  11. host: '0.0.0.0',
  12. port: 8002,
  13. contentBase: ['./node_modules', './public'],
  14. publicPath: '/',
  15. disableHostCheck: true,
  16. proxy: {
  17. '/api': {
  18. // target: `http://localhost:8080/`, // 本地开发环境
  19. // target: `http://218.59.175.43:92`, // 内网测试环境
  20. // target: `http://218.59.175.44:8082/nsgk_test/`, // 公网测试环境
  21. // target: `http://eqixingguan.nongshen.net/`, // 公网测试环境
  22. // target: `http://218.59.175.44:99/gz_qixing/`, // 七星关
  23. target: `http://218.59.175.44:99/dengzhoushi/`, // 邓州
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^/api': ''
  27. },
  28. onProxyReq: function (proxyReq, req) {
  29. console.log(
  30. '[HPM] Origin changed from ' +
  31. req.headers.host +
  32. ' ~> ' +
  33. proxyReq.getHeader('host')
  34. );
  35. }
  36. },
  37. '/geoserver': {
  38. target: 'http://localhost:37300',
  39. logLevel: 'debug',
  40. changeOrigin: true,
  41. onProxyReq: function (proxyReq, req) {
  42. console.log(
  43. '[HPM] Origin changed from ' +
  44. req.headers.host +
  45. ' ~> ' +
  46. proxyReq.getHeader('host')
  47. );
  48. }
  49. }
  50. }
  51. }
  52. }
  53. };