bw-mini-app/config/dev.ts

32 lines
889 B
TypeScript

import type { UserConfigExport } from "@tarojs/cli"
export default {
mini: {},
h5: {
devServer: {
fs: {
allow: ['..']
},
proxy: {
'/api': {
target: 'https://bowongai-test--text-video-agent-fastapi-app.modal.run',
changeOrigin: true,
secure: true,
configure: (proxy, _options) => {
proxy.on('error', (err, _req, _res) => {
console.log('proxy error', err);
});
proxy.on('proxyReq', (_proxyReq, req, _res) => {
console.log('Sending Request to the Target:', req.method, req.url);
});
proxy.on('proxyRes', (proxyRes, req, _res) => {
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
});
},
}
}
}
}
} satisfies UserConfigExport<'vite'>