| | |
| | | port: env.VITE_PORT as unknown as number, |
| | | open: JSON.parse(env.VITE_OPEN), |
| | | hmr: false, |
| | | proxy: { |
| | | '/events': { |
| | | target: 'http://localhost:3000', |
| | | changeOrigin: true, |
| | | }, |
| | | /** @description 百度语音识别 */ |
| | | '/api/baidu/speech_recognition': { |
| | | target: 'https://aip.baidubce.com/rpc/2.0/tts/v1', |
| | | changeOrigin: true, |
| | | }, |
| | | /** @description 百度语音合成 */ |
| | | '/api/baidu/speech_synthesis': { |
| | | target: 'https://aip.baidubce.com/rpc/2.0/tts/v1', |
| | | changeOrigin: true, |
| | | rewrite: (path) => { |
| | | const newPath = path.replace('/api/baidu/speech_synthesis', ''); |
| | | return newPath; |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | build: { |
| | | // outDir: 'dist/' + mode.mode, |