1

I added app-ads.txt to src folder of my project.

In angular.json added "src/app-ads.txt" to "assets", that is:

"assets": [
    ....
    "src/app-ads.txt"             
 ],
 ...

Next step, I deploy the project to Firebase hosting:

  1. npm install -g firebase-tools
  2. firebase login
  3. firebase init
  4. during init wrote the "dist"
  5. ng build --prod --localize
  6. firebase deploy

After command number 5 in dist folder has 5 localized projects (image).

If open any folder inside has an app-ads.txt file (image).

But after deploying the file is missing.

How to fix it?

Yury Matatov
  • 805
  • 3
  • 11
  • 23

1 Answers1

0

I was able to get it to work with a similar setup. Double check you firebase.json rules. Here's what mine looks like,

{
  "hosting": {
      "public": "dist/{yourapp}",
      "ignore": [
          "firebase.json",
          "**/.*",
          "**/node_modules/**"
      ],
      "rewrites": [{
          "source": "**",
          "destination": "/index.html"
      }]
  }
}
fassetar
  • 615
  • 1
  • 10
  • 37