大卫在他的回购中:
https://github.com/davideast/react-ssr-firebase-hosting
index.js
在主根目录中而不是在目录中具有具有 firebase 功能的文件/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": "/"
}
}