-
Notifications
You must be signed in to change notification settings - Fork 12k
File Replacements Not Applied in RC.6 #16439
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
Hi @markheron91, File replacements is really meant to alter compilation and not asset files. |
As mentioned, the file replacements option is intended to replace individual files that are bundled within the output Javascript files (main, vendor, polyfills, etc.) during compilation. The configuration as shown in the example project was never intended to be used (or even work) in that way. The asset configuration can be controlled directly within individual configurations and is the officially supported method to accomplish these type of use cases. |
@alan-agius4 @clydin Thanks for the response - I had moved from the individual configurations as I was forced to support runtime environment configuration, but there are other ways for me to do this that do not rely on the behaviour that I was seeing previously in fileReplacements. I'll close this issue. Thanks! 😄 |
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. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, it worked fine in RC.4
Description
I recently updated my project from CLI 9.0.0-rc.4 to 9.0.0-rc.6. After upgrading, my file replacements of environment files are no longer working.
I use a json file in the assets folder to store my environment variables, which is populated at build with different values depending on my build configuration.
Now, instead of filling the file in with the values from the replacement file, nothing happens and the original json file from the assets/ folder is built.
🔬 Minimal Reproduction
Clone the repo: https://github.com/markheron91/TestAngularCLIRC6FileReplacements.git
🔥 Exception or Error
Notice that the default environment.json file with the blank url is included in the built code, not either of the replacement files that should have overwritten it.
🌍 Your Environment
Anything else relevant?
N/A
The text was updated successfully, but these errors were encountered: