x)- [x] bug report
- [ ] feature request
x)- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Node: v10.6.0
NPM: v6.1.0
CLI: v6.2.2
Mac OSX El Capitan (10.11.6)
I've just tested some flags like --delete-output-path, --output-path and --build-optimizer or --vendor-chunk. I know that it uses --prod implicitly and supports --watch since latest upgrade.
ng generate library my-lib
ng build my-lib --delete-output-path=false
Unknown option: --deleteOutputPath
The ng build command should provide the same functionality for libraries as for usual projects.
Hey @arm1n ,
What version of the CLI are you using? Please run ng version from your project and paste the result here. Thanks!
This is correctly erroring out as the library builder doesn鈥檛 support these flags.
Those flags are valid for the application builder. Building a library has different pipeline then building an application thus it cannot have the same flags, for instance build-optimizer or vendor-chunks cannot be used in libraries among others.
Valid flags for library builder are watch and tsConfig
@hansl As stated in the issue I'm using 6.2.2.
@alan-agius4 If that's the case then please update the docs, it reads as all flags are also supported for libraries. Despite that I think at least some flags should also work for library builds. Especially everything related to dist folder, as these flags were introduced to support valid use cases - f.e. hosting the compiled library on private git repos etc.
I'd also expect many of flags to be working with libraries builder
--poll
--forked-type-checker
--verbose
and so on
So voting for @arm1n comment above :)
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
@hansl As stated in the issue I'm using
6.2.2.@alan-agius4 If that's the case then please update the docs, it reads as all flags are also supported for libraries. Despite that I think at least some flags should also work for library builds. Especially everything related to
distfolder, as these flags were introduced to support valid use cases - f.e. hosting the compiled library on private git repos etc.