angular / angular/angularfire

Deploying to multiple firebase sites using angularFire and ng deploy

オープン
#3,309 コメント 12 件 リアクション 1 件 担当者 1 名 @davideast が担当を希望しています GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
6

説明

Versions:
"@angular/cli": "^14.2.10",
"@angular/cdk": "^14.2.1",
"@angular/fire": "^7.4.1",
"firebase": "^9.6.8",

I am having issues with setting up config to allow deploying to a dev/prod sites on Firebase hosting. The sites on firebase are in the same firebase project

I have followed this guide
https://github.com/angular/angularfire/blob/master/docs/deploy/getting-started.md

but I am receiving the same issue as these old unanswered github issues
https://github.com/angular/angularfire/issues/3077

https://github.com/angular/angularfire/issues/3076

Here is my setup

1) angular.json
```
"deploy": {
"builder": "@angular/fire:deploy",
"options": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"configurations": {
"dev": {
"firebaseProject": "<>",
"siteTarget": "devTarget",
"buildTarget": "<>:build:development"
},
"prod": {
"firebaseProject": "<>",
"siteTarget": "prodTarget",
"buildTarget": "<>:build:development"
}
}
}
}
```

2. firebase.json

```
{
"hosting": [
{
"target": "devTarget",
"public": "dist",
"ignore": [
"**/.*"
]
},
{
"target": "prodTarget",
"public": "dist",
"ignore": [
"**/.*"
]
}
]
}
```

3. .firebaserc
```
{
"projects": {
"default": "<>"
},
"targets": {
"<>": {
"hosting": {
"devTarget": [
"<>"
],
"prodTarget": [
"<>"
]
}
},
"etags": {}
}

```

Should this work if i run ``` ng deploy <> --configuration='dev'```?

I receive the following error from ```node_modules\@angular\fire\schematics\deploy\builder.js:36:15```

```
An unhandled exception occurred: The Firebase Hosting Site specified by your angular.json or .firebaserc is in conflict
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。