- [ ] new
- [ x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
No
Consider building foo library with the command ng build foo.
When the library contains a file (service in my case), which uses dynamic import, the build will fail throwing error below. This happens in v7 and also after upgrading to v8.0.0-rc.4
ng g library foo. public-api.tsng build shared
Building Angular Package
Building entry point 'testik'
Compiling TypeScript sources through ngc
Bundling to FESM2015
BUILD ERROR
You must set "output.dir" instead of "output.file" when generating multiple chunks.
Error: You must set "output.dir" instead of "output.file" when generating multiple chunks.
at error (c:\Development\rollup-test\node_modules\rollup\dist\rollup.js:3410:30)
at normalizeOutputOptions (c:\Development\rollup-test\node_modules\rollup\dist\rollup.js:17107:13)
at getOutputOptions (c:\Development\rollup-test\node_modules\rollup\dist\rollup.js:16865:24)
at Object.write (c:\Development\rollup-test\node_modules\rollup\dist\rollup.js:16957:43)
at Object. (c:\Development\rollup-test\node_modules\ng-packagr\lib\flatten\rollup.js:46:22)
at Generator.next ()
at fulfilled (c:\Development\rollup-test\node_modules\ng-packagr\lib\flatten\rollup.js:4:58)
Angular CLI: 8.0.0-rc.4
Node: 10.15.0
OS: win32 x64
Angular: 8.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.800.0-rc.4
@angular-devkit/build-angular 0.800.0-rc.4
@angular-devkit/build-ng-packagr 0.800.0-rc.4
@angular-devkit/build-optimizer 0.800.0-rc.4
@angular-devkit/build-webpack 0.800.0-rc.4
@angular-devkit/core 8.0.0-rc.4
@angular-devkit/schematics 8.0.0-rc.4
@angular/cdk 8.0.0-rc.1
@angular/flex-layout 7.0.0-beta.24
@angular/material 8.0.0-rc.1
@ngtools/json-schema 1.1.0
@ngtools/webpack 8.0.0-rc.4
@schematics/angular 8.0.0-rc.4
@schematics/update 0.800.0-rc.4
ng-packagr 5.1.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0
Anything else relevant?
I'm sorry, but this issue is not caused by Angular CLI. Please contact the author(s) of the ng-packagr project or file an issue on their issue tracker.
Note: at the moment this is not supported by ng-packagr.
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._