Skip to content

Commit 1660fa0

Browse files
committed
refactor: make index option nullable for browser-esbuild
For testing use cases, we don't need an `index.html` file in the same capacity as a typical application. The builder already omits an `index.html` page when not set, this just updates the schema to reflect that. The parameter could be left optional, rather than required but allowing `false`. However doing it this way prevents users from accidentally forgetting to provide an index while still allowing users to explicitly disable index generation. We use `false` instead of `null` so users can write `--no-index` on the command line and get the same behavior, which would not be possible with `null`. (cherry picked from commit 0d4a40f)
1 parent ada40e6 commit 1660fa0

File tree

1 file changed

+4
-0
lines changed
  • packages/angular_devkit/build_angular/src/builders/browser-esbuild

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@
397397
}
398398
},
399399
"required": ["input"]
400+
},
401+
{
402+
"const": "false",
403+
"description": "Does not generate an `index.html` file."
400404
}
401405
]
402406
},

0 commit comments

Comments
 (0)