小编D. *_*Joe的帖子

@ngtools/webpack AngularWebpackPlugin 可以链接部分编译的 ivy 库吗?

我有这个有点旧的 Angular Web 应用程序,它已从 Angular 6 更新到 Angular 12,但是,Angular CLI 并未用于构建它,而是依赖于 Webpack 5、其加载器和来自 @ngtools/webpack 的 AngularWebpackPlugin。

最近,我需要升级到我正在使用的库的最新版本,在生产构建后我收到以下警告:

Uncaught Error: The injectable 'j' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.

The injectable is part of a library that has been partially compiled.
However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.

Ideally, the library is processed using the Angular Linker to become fully AOT compiled.
Alternatively, the …
Run Code Online (Sandbox Code Playgroud)

webpack angular ngtools

4
推荐指数
1
解决办法
2910
查看次数

标签 统计

angular ×1

ngtools ×1

webpack ×1