Skip to content

Commit 7eb4dd7

Browse files
committed
environment
1 parent e11ccae commit 7eb4dd7

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

angular.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343
"maximumError": "4kB"
4444
}
4545
],
46-
"outputHashing": "all"
46+
"outputHashing": "all",
47+
"fileReplacements": [
48+
{
49+
"replace": "src/environments/environment.ts",
50+
"with": "src/environments/environment.prod.ts"
51+
}
52+
]
4753
},
4854
"development": {
4955
"optimization": false,
@@ -68,6 +74,7 @@
6874
"extract-i18n": {
6975
"builder": "@angular-devkit/build-angular:extract-i18n"
7076
},
77+
7178
"test": {
7279
"builder": "@angular-devkit/build-angular:karma",
7380
"options": {

src/environment.prod.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const environment = {
2+
production: true,
3+
apiUrl: 'https://your-production-api.com' // Beispielwert für Produktion
4+
};
5+

src/environment.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const environment = {
2+
production: false,
3+
apiUrl: 'http://localhost:4200' // Beispielwert, anpassbar je nach Projektanforderungen
4+
};
5+

0 commit comments

Comments
 (0)