To deploy my Angular project I ran ng build --configuration production
and then firebase deploy --only hosting
. It says:
Thank you for trying our early preview of Angular support on Firebase Hosting.
During the preview, support is best-effort and breaking changes can be expected. Proceed with caution.
Documentation: https://firebase.google.com/docs/hosting/frameworks/angular
File a bug: https://github.com/firebase/firebase-tools/issues/new?template=bug_report.md
Submit a feature request: https://github.com/firebase/firebase-tools/issues/new?template=feature_request.md
We'd love to learn from you. Express your interest in helping us shape the future of Firebase Hosting: https://goo.gle/41enW5X
Error: No i18n config on project.
I have Transloco 5.0.7 installed. Reading how to Configure internationalization (i18n) rewrites, it appears that Firebase Hosting is looking for this:
"i18n": {
"root": "/localized-files"
},
in firebase.json
. It expects to see localized-files
in the public
directory:
public/localized-files/
My Angular app doesn't have this directory structure. I have:
src/app/assets/i18n/
I tried
"i18n": {
"root": "src/app/assets/i18n/"
},
"i18n": {
"root": "app/assets/i18n/"
},
"i18n": {
"root": "/assets/i18n/"
},
and
"i18n": {
"root": "assets/i18n/"
},
These all throw similar errors:
hosting: Couldn't find specified i18n root directory /assets/i18n in public directory .
Is there another config line in firebase.json
that tells Firebase Hosting that Angular puts index.html
in an app
directory, not a public
directory?