docs(cli): document that scripts and styles can accept objects
See original GitHub issueπ Docs or angular.io bug report
Description
https://angular.io/cli/build mentions
Some additional options can only be set through the configuration file, either by direct editing or with the ng config command. These include assets, styles, and scripts objects that provide runtime-global resources to include in the project.
https://angular.io/guide/workspace-config#alternate-build-configurations and https://next.angular.io/guide/workspace-config#additional-build-and-test-options mention
OPTIONS PROPERTIES | DESCRIPTION |
---|---|
styles | An object containing style files to add to the global context of the project. Angular CLI supports CSS imports and all major CSS preprocessors:Β sass/scss,Β less, andΒ stylus. |
scripts | An object containing JavaScript script files to add to the global context of the project. The scripts are loaded exactly as if you had added them in aΒ <script>Β tag insideΒ index.html. |
But neither cover that they can accept an extraEntryPoint object like: {"input": "src/styles/foo.css", "lazy": true, "bundleName: "foo"}
nor how to use the features that these options enable like lazy loading styles.
π¬ Minimal Reproduction
Whatβs the affected URL?**
https://angular.io/guide/workspace-config#alternate-build-configurations https://next.angular.io/guide/workspace-config#additional-build-and-test-options
Reproduction Steps**
See Description.
Expected vs Actual Behavior**
Stable features are expected to be documented. Actual: stable features are not documented.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Landed in Next, depends on CLI change that isnβt in Stable yet (renamed a parameter that was misleading)
Another missing part similar to the above is the
sourceMap
andoptimization
options when they donβt have a boolean value.