Angular 2 RC 4 compiler-cli errors -


i'm giving try angular 2 rc4 compiler-cli project components compiled offline , i'm running problems in here.

just notice, using directions can found in here: http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/

so, layout we're having here several private npm packages have been exported es5 target es2015 version of package nested in esm folder , jsnext:main tag in place points esm/core.js.

as done i'm building project loading external modules , creates application, runs no problems. in order make better i'd apply techniques described in web post mentioned above.

in order of i've created tsconfig file sets target , module es2015 , run:

node_modules/.bin/ngc -p . 

and i'm doing on linux build server.

problem setup reason of components described in external packages cannot parsed ngc , getting:

error: no directive annotation found on *external component* 

error per each use of components located in core package.

so, can point me what's wrong setup , how can solved?

i see how bundle size in final layout...

also, i've noticed of examples use moduelid within @component decorator i've not seen need that, @ least - that problem?

ps

if ignore errors , try go on see components including of external components producing errors, *.ngfactory.ts generated empty file.

pps

alternatively compile project plain ts files. run major problems on how redirect references my-local-core local folder package ts source files, module mapped node-modules folder.

answer angular compiler-cli still not in state capable offline compilation of bigger hello world project. first of there major source of misunderstanding way how template url's parsed when angular components deployed without pre-compilation url's taken global ones, deriving web page url. although when comes pre compilation url's taken relative component ts file - if use absolute url's don't have offline compiling if use relative url's won't work in non pre compiled mode. secondly component defined in external package cannot parsed pre compiled version compiler-cli has no knowledge transpiled javascript version of it. , holds true different module formats including es2015. thirdly ngc cannot parse custom decorators , functionality works within tsc brakes "error encountered resolving symbol values statically" encounters instance of it.

looking forward rc 5 or final release of angular2.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -