We need to update the Wiki to include command options and journey updates.
To track the wiki stories:
We also need to update the docs for individual commands.
We also need to add a link to the old docs
After a release, we should add schema links to the workspace file docs
We'll also need to add the library doc there.
Currently even after watching presentation angular.json is out of scope to me, i have to generate same app in two app (due to i18n) and I want different architect.build.options (remove some assets from one)
I can run ng build --configuration=myConf it will point architect.build.configurations but what about architect.build.options how have multiple options?
like ng build --options=myOptions
Thanks @filipesilva
Heya @istiti, you can override any options you want in configurations. For instance, you can have:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
}
],
},
"configurations": {
"language-fr": {
"i18nLocale": "fr",
"i18nFile": "src/locale/messages.fr.xlf",
"assets": [],
},
"language-de": {
"i18nLocale": "de",
"i18nFile": "src/locale/messages.de.xlf",
"assets": [],
}
}
},
This should give you i18n for two different languages, without assets. Is this what you wanted?
@filipesilva thanks but have you tried this ?
because on my side if I reset asse to empty array I get:

I copy exactly your config and run ng b -c=fr it seems because assets reset to empty array it stop command without error, if I remove assets:[] it works it compile, might be a bug ?
@filipesilva If i put options like sourceMap into architect.build.options it is also applied to architect.serve.options?
I want to set defaults for build like "sourceMap": false which should not be applied to serve. But right now i have to repeat myself:
"configurations": {
"testing": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.testing.ts"
}
],
"sourceMap": false,
},
"staging": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts",
}
],
"sourceMap": false,
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"sourceMap": false,
}
}
@istiti that is indeed a bug, I know what's wrong and will fix (https://github.com/angular/devkit/pull/819)
@MickL Yes, what you put in build will be applied to serve since the dev server will use the build options. However, sourceMap is one of the (few) build options that you can override in serve (https://github.com/angular/devkit/pull/734).
Reopening as this was not meant to be closed (yet).
configure-hmr (pr - #10500)
If you follow the docs, you will end up with
Schema validation failed with the following errors:
Data path "['serve'].configurations['hmr']" should be object.
Error: Schema validation failed with the following errors:
Data path "['serve'].configurations['hmr']" should be object.
Fixed with PR #10592
@robertbaker sorry for that, I have pushed a fix in https://github.com/angular/angular-cli/pull/10603. The file replacement was also missing.
I'm closing this issue because all the items I had in the original list are addressed.
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._
Most helpful comment
We'll also need to add the library doc there.