Closed dougpool closed 5 years ago
I think this is by design of the compiler.
Can you open an issue in https://github.com/angular/angular instead?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Repro steps
Step 1: Clone https://github.com/dougpool/aot-prod-env Step 2:
ng serve -c dev
and check screen/console (works as desired) Step 3:ng serve -c production
and check screen/check console (missing common env message is the bug)The log given by the failure
N/A
Desired functionality
See project README.md for detailed expected output and examples
Environment files composed from other files should work in production mode and have properties copied into environment via the object spread operator and the environment is passed to another module
common-env.ts
environment.prod.ts
Code where correct environment fails to get created app.module.ts snippet
Instead, the properties are not copied when the the application is served or built with the
ng
command.Mention any other details that might be useful
Potentially related: https://github.com/angular/angular-cli/issues/9511