Search code examples
angularwebpacknativescriptangular2-aotnativescript-angular

Nativescript's AOT Compilation succeeds - but still the `Compiler` package included?


I'm invoking :

npm run ns-bundle --android --build-app --uglify

It does succeed (here is the complete log).

If I navigate to the report folder (created by webpack-bundle-size-analyzer) - I see those two files :

enter image description here

Opening the html file shows :

enter image description here

As you can see - the compiler from @angular is still there !!!

Question

1) Why does the compiler still there ? (AOT should remove it). How do I remove it ?
2) If I hover the bundle.js section it shows me parsed size. so what is stat/parsed size ?

https://i.imgur.com/25bRez3.jpg


Additional info :

I must say that when i search bundle.js in filesystem - I see two files :

enter image description here

And a second one :

enter image description here


webpack.config.json : http://jsbin.com/varetibaya/1/edit?html
package.json : http://jsbin.com/sajifojuki/edit?html
main.aot.file : http://jsbin.com/jimonurama/edit?html
ts.config.aot : http://jsbin.com/tatahesoma/edit?html


Solution

  • @yurzui has found the problem .

    Changed :

    import {RouterExtensions} from "nativescript-angular";
    

    with

    import {RouterExtensions} from "nativescript-angular/router";
    

    Now - there is no compiler in the package.

    (With many thanks.).