【发布时间】:2018-08-01 16:00:36
【问题描述】:
大卫在他的回购中:
https://github.com/davideast/react-ssr-firebase-hosting
在主根目录中有带有firebase函数index.js的文件,没有在/functions目录中。
但是,如果我这样做并将我的 index.js 文件放到主根目录,如果我这样做 firebase deploy --only functions 它会在控制台中显示:
i deploying functions
Error: functions\index.js does not exist, can't deploy Firebase Functions
问:他是怎么做到的?我该如何做同样的事情并从/functions以外的其他目录成功部署功能?
谢谢
firebase.json
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"function": "ssrapp"
}
]
},
"functions": {
"source": "/"
}
}
【问题讨论】:
标签: javascript firebase google-cloud-functions firebase-cli