Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 能否支持一下vite配置呢? #319

Open
ZDHSir opened this issue Jan 4, 2024 · 2 comments
Open

Feature: 能否支持一下vite配置呢? #319

ZDHSir opened this issue Jan 4, 2024 · 2 comments

Comments

@ZDHSir
Copy link

ZDHSir commented Jan 4, 2024

vite 怎么去使用?

@ZDHSir
Copy link
Author

ZDHSir commented Jan 4, 2024

vite 怎么去使用?

`import { ProxyOptions } from "vite";

export const proxy:Record<string, string | ProxyOptions> | undefined = {
"/xhr/(.*)":{
target: 'xxxxx/api',
// target: 'xxxxx',
changeOrigin: true,
rewrite(path){
return path.replace(/^/xhr/, '/')
},
}
};`

@jaywcjlove
Copy link
Owner

jaywcjlove commented Jan 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants