我已经用single.firebaserc文件完成了。您可以添加要部署的不同目标。
https://firebase.google.com/docs/cli/targets
https://firebase.google.com/docs/cli/
]
"hosting": [
{
"target": "prod",
"public": "dist/<folder_name>,
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
]
//.firebaserc文件
//示例:这里的“项目”是您的目标
{
"projects": {
"default": "staging-project",
"dev": "staging-project",
"prod": "prod-project"
},
"targets": {
"staging-project": {
"hosting": {
"stage": [
"staging-project"
],
"admin-stage": [
"your-admin-stage"
],
"admin-prod": [
"your-admin-prod"
],
"prod": [
"prod-project"
]
}
}
}
}
firebase use dev
firebase deploy --only firestore:rules,hosting:stage,functions...