-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[feature-request] Specify default configuration in angular.json, if no configuration provided #11120
Comments
@sebastian-zarzycki-es, the |
Like I said, I don't believe this to be a proper solution. It's harder to maintain and less readable. I don't like having fileReplacements directly within "options" either. It's no longer an option, it's a specific action performed. |
|
"The intent of the design is to limit the repetition of configuration parameters within the build configurations. The less repetition; the less chance for errors." Configuration file in text form is for human, not for computer. You're adding additional step for a human to mentally parse options section and then merge/override/replace them with what's found in configuration section. That's actually higher chance for errors. |
The problem is there's no good way to modify the default configuration that is used if someone simply runs |
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. |
Provide a way to specify a default configuration in angular.json, if no configuration is provided in commandline or otherwise.
If I understand correctly "dev" was the default configuration in Angular <=5, but it doesn't seem to be the case in Angular 6. Since we're now specifying configurations in a more detailed way (not just environment parameter), I think it would be useful to have a way to define which configuration is the default one. This would eliminate potential issues of "ng serve" vs "ng serve -c dev" and so on.
Technically, the "default" options could be specified directly within particular sections of angular.json (outside of configuration section), but I don't think it's a clean and desired solution. Defining configurations in their separate place seems readable and easier to maintain.
The text was updated successfully, but these errors were encountered: