-
-
Notifications
You must be signed in to change notification settings - Fork 481
chore: Migrate from now.json to vercel.json #1173
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "framework": "umijs" | ||
| } | ||
|
Comment on lines
+1
to
+3
Contributor
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. 🧩 Analysis chain验证UmiJS框架标识符和配置完整性 需要确认"umijs"是否为Vercel支持的有效框架标识符,并验证这个最小化配置是否满足项目的部署需求。建议检查原始now.json中是否包含其他需要迁移的配置(如构建命令、输出目录、环境变量等)。 请运行以下脚本验证框架配置的有效性: 另外,您可以通过查阅最新的Vercel框架支持文档来确认"umijs"是否为有效的框架标识符: 🏁 Script executed: #!/bin/bash
# 搜索项目中是否存在now.json或其备份,查看原始配置内容
fd -e json -type f | grep -E "(now|vercel)" | head -20
# 检查package.json中的UmiJS相关依赖
cat package.json | grep -A 5 -B 5 "umi"Length of output: 1011 🌐 Web query: 💡 Result: Yes — Vercel lists UmiJS as a supported framework and provides a deployment guide. See Vercel's supported frameworks list and the UmiJS deploy guide. [1][2] Sources: 需要进一步搜索now.json文件以验证配置完整性。让我运行修正的脚本: Length of output: 225 需要验证最小化配置是否充分。让我检查项目的构建配置: Length of output: 402 需要最后确认Vercel对UmiJS最小配置的支持情况: 💡 Result: Summary — minimal Vercel setup to deploy an UmiJS app (static output)
Notes
Sources 补充buildCommand和outputDirectory配置 vercel.json配置不完整。虽然"umijs"是Vercel支持的有效框架标识符,但Vercel建议在vercel.json中显式指定buildCommand和outputDirectory来确保正确部署。根据UmiJS的默认构建输出为dist目录,建议修改为: {
"buildCommand": "npm run build",
"outputDirectory": "dist"
}注意:项目中build脚本为"dumi build"而非"umi build",请确保这与UmiJS的默认构建行为兼容,或根据实际输出目录调整outputDirectory的值。 🤖 Prompt for AI Agents |
||
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.
The previous
now.jsonconfiguration specified a project name with"name": "rc-select". To ensure consistency and prevent the project name on Vercel from changing unexpectedly, it's recommended to also add thenameproperty to yourvercel.jsonconfiguration.