Add serve options to angular.json for development environment

This commit is contained in:
Vincent Guillet
2025-11-28 15:27:19 +01:00
parent facfd5d32b
commit bfe7176388
2 changed files with 10 additions and 14 deletions

View File

@@ -64,6 +64,15 @@
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": {
"buildTarget": "client:build:development",
"host": "0.0.0.0",
"port": 4200,
"proxyConfig": "proxy.conf.json",
"allowedHosts": [
"dev.vincent-guillet.fr"
]
},
"configurations": { "configurations": {
"production": { "production": {
"buildTarget": "client:build:production" "buildTarget": "client:build:production"

View File

@@ -1,13 +0,0 @@
import { defineConfig } from 'vite';
// Angular utilise Vite en interne — cette config surcharge seulement le serveur dev.
export default defineConfig({
server: {
host: true, // permet 0.0.0.0 => accessible depuis Docker
allowedHosts: [
'dev.vincent-guillet.fr' // on autorise ton domaine
],
strictPort: true,
port: 4200
}
});