我在我的项目的src文件夹中添加了app-ads.txt。
在angular.json中,"src/app-ads.txt"
添加到"assets"
中,即:
"assets": [
....
"src/app-ads.txt"
],
...
下一步,我将项目部署到Firebase宿主:
npm install -g firebase-tools
firebase login
firebase init
ng build --prod --localize
firebase deploy
在dist文件夹中的第5号命令之后,有5个本地化项目(
)。
如果打开里面的任何文件夹,都有一个app-ads.txt文件(
)。
但是在部署之后,文件就丢失了。
怎么修呢?
发布于 2022-10-27 17:19:19
我能够让它与类似的设置一起工作。再次检查你的firebase.json规则。我的样子是这样的,
{
"hosting": {
"public": "dist/{yourapp}",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [{
"source": "**",
"destination": "/index.html"
}]
}
}
https://stackoverflow.com/questions/72318108
复制相似问题