-
Notifications
You must be signed in to change notification settings - Fork 12k
Feature req: Environment specific assets/ angular-cli files #4150
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 know some users are adding stubs via the environment files (see #3940) but I understand your request is different. I'll tag it for discussion but don't have any plans to add it for now. |
Thanks for the link. Yes, my case is different. I need to add different json files (and other resource files) depending on the environment. |
@filipesilva Just found out that the "apps" option in angular-cli.json is really an array although it seems only first element is currently supported. If angular was changed to fully support multiple elements in the configuration "apps" array than my use case (and many, many other use-cases) would be solved! |
+1, need to load different images for different environments |
+1, We're going through the same problem, right now. Environment based assets would be beneficial. |
Heya @mmc41, you can now use the apps array as documented here: https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/multiple-apps.md |
I believe this has moved here now: https://github.com/angular/angular-cli/wiki/stories-multiple-apps |
@filipesilva The story is also missing in the stories directory: |
Is this feature still available in Angular 8? Currently, I have several directories:
After the build, the folder of the configured customer should be available 1 directory level higher. (I've taken a look at the links above, but they either refer to the old |
@takahser Instead you could have:
And then you can add it to the build of each customer:
|
@MickL thanks, that worked 👍🏼 |
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. |
Currently, one can add asset folders by adding them to angular-cli.json's assets key. These assets will always be added regardless of environment.
I need to add test assets (stub-data) for test/development environments only - they should not be added to production. Hence I would like, angular-cli to support specifying different sets of asset folders depending on the build environment.
Another more general option, would be for angular-cli to support multiple angular-cli*.json files (additional files with environment specific overrides).
The text was updated successfully, but these errors were encountered: