我正在调用:
npm run ns-bundle --android --build-app --uglify
它确实成功了(这里是 the complete log )。
如果我导航到 report
文件夹(由 webpack-bundle-size-analyzer
创建) - 我会看到这两个文件:
打开html文件
显示:
正如你所看到的 - @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
最佳答案
@yurzui 已发现问题。
更改:
import {RouterExtensions} from "nativescript-angular";
与
import {RouterExtensions} from "nativescript-angular/router";
现在 - 包中没有编译器。
(非常感谢。)。
关于angular - Nativescript 的 AOT 编译成功 - 但仍然包含 `Compiler` 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47239004/