Currently i have three environments and I am trying to get --env=prod
value in my server.ts
which in this case is prod
I am getting the right environment object in my angular app but issues getting it in my server.ts
file which is necessary for achieving ssr
i am setting the environment using the attribute --env=prod
or --env=dev
and importing in my server.ts
like
import { environment } from'./src/environments/environment';
this is what my environment object in .angular-cli.json
looks like for both angular and server platform
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"test": "environments/environment.test.ts"
}
and i do have all the files in the mentioned path