prod.js 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const isH5 = process.env.CLIENT_ENV === 'h5'
  2. const HOST = '"http://zhcq-m.jishutao.com/gw"'
  3. const HOST_M = '"http://zhcq-m.jishutao.com/gw"'
  4. // XXX 搭了个 proxy 用于演示 prod 环境的 H5
  5. const HOST_H5 = '"http://zhcq-m.jishutao.com/gw"'
  6. const HOST_M_H5 = '"http://zhcq-m.jishutao.com/gw"'
  7. module.exports = {
  8. env: {
  9. NODE_ENV: '"production"'
  10. },
  11. defineConstants: {
  12. HOST: isH5 ? HOST_H5 : HOST,
  13. HOST_M: isH5 ? HOST_M_H5 : HOST_M
  14. },
  15. weapp: {},
  16. h5: {
  17. devServer: {
  18. proxy: {
  19. '/gw/': {
  20. target: JSON.parse(HOST),
  21. pathRewrite: {
  22. '^/gw/': '/'
  23. },
  24. changeOrigin: true
  25. },
  26. // '/api-m/': {
  27. // target: JSON.parse(HOST_M),
  28. // pathRewrite: {
  29. // '^/api-m/': '/'
  30. // },
  31. // changeOrigin: true
  32. // }
  33. },
  34. }
  35. // publicPath: '/kede-createRD-h5'
  36. }
  37. }