【发布时间】:2018-04-24 15:22:08
【问题描述】:
我正在调用:
npm run ns-bundle --android --build-app --uglify
确实成功了(这里是the complete log)。
如果我导航到report 文件夹(由webpack-bundle-size-analyzer 创建) - 我会看到这两个文件:
打开html file显示:
如您所见 - @angular 的编译器仍然存在!!!
问题
1) 为什么编译器还在? (AOT 应该删除它)。如何删除它?
2) 如果我将鼠标悬停在 bundle.js 部分,它会显示解析后的大小。那么什么是统计/解析大小?
其他信息:
我必须说,当我在文件系统中搜索 bundle.js 时 - 我看到两个文件:
还有第二个:
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
【问题讨论】:
-
好像在某处使用过。尝试调试你的包。例如,尝试检查是否调用了
compileModuleAndAllComponentsAsync(或来自 jit 编译器的其他内容) -
@yurzui - It does being called。那么这是什么意思 ?那个 AOT 不工作?或者是吗?我希望不会在图中看到
@compiler -
或
JitCompilerFactory在某处提供 -
确保
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);是起点 -
github.com/NativeScript/nativescript-angular/blob/master/… Nativescript 覆盖了这些服务 但也许它只适用于动态平台NativeScriptDynamic。我没用过
标签: angular webpack nativescript angular2-aot nativescript-angular