conversational-workflow / vite.config.ts
3v324v23's picture
优化
d6daac3
raw
history blame contribute delete
913 Bytes
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tsconfigPaths from "vite-tsconfig-paths";
import { traeBadgePlugin } from 'vite-plugin-trae-solo-badge';
// https://vite.dev/config/
export default defineConfig({
build: {
sourcemap: 'hidden',
},
plugins: [
react({
babel: {
plugins: [
'react-dev-locator',
],
},
}),
traeBadgePlugin({
variant: 'dark',
position: 'bottom-right',
prodOnly: true,
clickable: true,
clickUrl: 'https://www.trae.ai/solo?showJoin=1',
autoTheme: true,
autoThemeTarget: '#root'
}),
tsconfigPaths()
],
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'https://api.siliconflow.cn',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/v1'),
secure: false,
},
},
},
})