-
Notifications
You must be signed in to change notification settings - Fork 26
'bugFix' #200
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
base: dev
Are you sure you want to change the base?
'bugFix' #200
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,11 +17,6 @@ const proxyConfig = { | |
| target: env.VITE_SERVER_HOST, | ||
| changeOrigin: true, | ||
| logLevel: 'debug', | ||
| rewrite: (path: string) => | ||
| path.replace( | ||
| new RegExp(`${env.VITE_BASE_API}`), | ||
| '', | ||
| ), | ||
|
Comment on lines
-20
to
-24
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这边不rewrite的话,发送的就是 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry,这是我项目中定制的一个业务逻辑,因为我的后端服务有/api前缀,这个修改不应该带入到tiny-pro的版本中
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
嗯嗯,由时间的话可以提交一个commit~ |
||
| }, | ||
| [env.VITE_MOCK_SERVER_HOST]: { | ||
| target: env.VITE_SERVER_HOST, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: opentiny/tiny-pro
Length of output: 1873
VITE_USE_MOCK=falseis a string, not a boolean—the consumer code at line 61 oflogin-info.vuewill not work as intended.The condition
if (!import.meta.env.VITE_USE_MOCK)treats the string"false"as truthy, causing the logic to invert. When this environment variable is set to"false", the condition evaluates tofalse, and the intended mock-disabled behavior does not execute.The type declaration at
env.d.tsline 20 confirmsVITE_USE_MOCK: string, yet the documentation claims it is aBoolean. Fix the consumer code to explicitly parse the string:const useMock = import.meta.env.VITE_USE_MOCK === 'true'.🤖 Prompt for AI Agents