import type { UserConfig } from 'vite';

const viteConfig:UserConfig = {
    port: 3555,
    hostname: "localhost",
    proxy: {
        '/api': {
            target: 'http://www.baidu.com',
            changeOrigin: true,
            ws: true,
            rewrite: path => path.replace(/^\/api/, '')
        }
    }
}

export default viteConfig;
Logo

前往低代码交流专区

更多推荐