angular - Nativescript 的 AOT 编译成功 - 但仍然包含 `Compiler` 包?

标签 angular webpack nativescript angular2-aot nativescript-angular

我正在调用:

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

它确实成功了(这里是 the complete log )。

如果我导航到 report 文件夹(webpack-bundle-size-analyzer 创建) - 我会看到这两个文件:

enter image description here

打开html文件显示:

enter image description here

正如你所看到的 - @Angular 的编译器仍然存在!!!

问题

1) 为什么编译器仍然存在? (AOT 应该将其删除)。如何删除它?
2)如果我将鼠标悬停在bundle.js部分,它会显示解析后的大小。那么统计/解析大小是什么?

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


其他信息:

我必须说,当我在文件系统中搜索 bundle.js 时 - 我看到两个文件:

enter image description here

还有第二个:

enter image description here


webpack.config.json:http://jsbin.com/varetibaya/1/edit?html
package.json:http://jsbin.com/sajifojuki/edit?html
ma​​in.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/

相关文章:

Angular Material 2 数据表标题未右对齐

angular - 在 Angular 2 绑定(bind)中显示 HTML 特殊字符?

javascript - 为什么这个选择器的投影仪函数返回未定义?

angular - MAT-SELECTION-LIST 绑定(bind)不适用于 FormGroup?

node.js - 无法解析 'babel-loader'

angular - Webpack Module Federation Unsatisfied version 11.x.x of shared singleton module @angular/common (required ^7.2.0)

webpack - 如何在 Webpack 构建期间评估 Node 脚本并使其内容可用于编译后的代码?

javascript - 如何在 nativescript 中定义默认的 TabView?

angular - 奇怪的 NativeScript/Angular2 问题,应用程序在错误的位置查找模板

checkbox - 将标签添加到复选框/开关 Angular 2