fix(vite-build): env file is supported in vite build#112
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ly5156 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughProduction API configuration now defines Vite-prefixed base URL and timeout variables. Axios reads these variables first and falls back to the existing process environment variables and defaults. ChangesVite API Configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/web/.env.production`:
- Around line 6-10: Rename the production build-time variables to use only the
VITE_APP_* names so API and timeout overrides are recognized. In
packages/web/.env.production lines 6-10, remove the VUE_APP_* variants and
retain the VITE_APP_* variables; in packages/web/src/utils/request.js lines
12-15, no direct change is needed if the existing VITE_APP_* precedence remains
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7e3b66ba-7c36-410c-9fd5-3fb6ecc0a102
📒 Files selected for processing (2)
packages/web/.env.productionpackages/web/src/utils/request.js
dbd29d0 to
22a7ff7
Compare
Signed-off-by: ly5156 <361112237@qq.com>
22a7ff7 to
618265d
Compare
.env.production文件,支持使用 Vite 构建时,符合 Vite 环境变量定义规则,参考:https://v5.vite.dev/guide/env-and-mode.html#env-filespackages/web/src/utils/request.js文件,支持使用 Vite 构建时,读取对应的环境变量Summary by CodeRabbit