-
Notifications
You must be signed in to change notification settings - Fork 12k
Angular CLI serve re-compiles without change in source #9149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm also seeing the same thing (wrong environment file being used after a while, during ng serve). To be clear, what seems to happen is that ng serve launches using the correct environment file (e.g. environment.dev.ts), but after a few changes, it seems to switch over to the base environment.ts file. This is using CLI 1.7.4 (haven't been able to update to 6 yet, due to some other libs not yet migrated to 6). |
Heya, we're tracking this in #11339 where there is more detail and a better repro case. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Node: 6.11.3
OS: win32 x64
Angular: 5.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cdk: 5.0.4
@angular/cli: 1.6.3
@angular/language-service: 4.4.6
@angular/material: 5.0.4
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.3
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.6.2
webpack: 3.10.0
Repro steps
ng serve -env=local
Observed behavior
export const baseWebApiUrl = 'http://xxx:999/api/';
export const baseWebApiUrl = 'http://localhost:63037/api/';
Angular client tries to access web api at http://xxx:999/api/ .
local is just an example, It happens with env=dev too.
Desired behavior
Mention any other details that might be useful (optional)
When the problem happens I stop ng serve and then do ng build -env=local and then start ng serve -env=local again and things go fine until the problem again happens while re-compiling the wrong environment file is used
The text was updated successfully, but these errors were encountered: