Update vite.config.ts

与  react 模板统一配置。

https://github.com/Tencent/tdesign-react-starter/blob/develop/vite.config.js#L47-L57
This commit is contained in:
mouyong 2022-03-11 15:57:22 +08:00 committed by GitHub
parent 07520a97e2
commit 89f8cbc1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,10 +26,15 @@ export default defineConfig({
], ],
server: { server: {
port: 3002,
host: '0.0.0.0', host: '0.0.0.0',
port: 3003,
proxy: { proxy: {
'/api': 'http://127.0.0.1:3000/', '/api': {
// 用于开发环境下的转发请求
// 更多请参考https://vitejs.dev/config/#server-proxy
target: 'http://127.0.0.1:3000/',
changeOrigin: true,
},
}, },
}, },
}); });