1234567891011121314151617181920212223242526272829303132333435363738394041 |
- const isH5 = process.env.CLIENT_ENV === 'h5'
- const HOST = '"http://zhcq-m.jishutao.com/gw"'
- const HOST_M = '"http://zhcq-m.jishutao.com/gw"'
- // XXX 搭了个 proxy 用于演示 prod 环境的 H5
- const HOST_H5 = '"http://zhcq-m.jishutao.com/gw"'
- const HOST_M_H5 = '"http://zhcq-m.jishutao.com/gw"'
- module.exports = {
- env: {
- NODE_ENV: '"production"'
- },
- defineConstants: {
- HOST: isH5 ? HOST_H5 : HOST,
- HOST_M: isH5 ? HOST_M_H5 : HOST_M
- },
- weapp: {},
- h5: {
- devServer: {
- proxy: {
- '/gw/': {
- target: JSON.parse(HOST),
- pathRewrite: {
- '^/gw/': '/'
- },
- changeOrigin: true
- },
- // '/api-m/': {
- // target: JSON.parse(HOST_M),
- // pathRewrite: {
- // '^/api-m/': '/'
- // },
- // changeOrigin: true
- // }
- },
- }
- // publicPath: '/kede-createRD-h5'
- }
- }
|