简体   繁体   English

是否可以在多个应用程序中共享 Angular 2+ 核心库?

[英]Is it possible to share the Angular 2+ core libraries over multiple applications?

We have multiple Angular applications on the same platform.我们在同一平台上有多个 Angular 应用程序。 Today they all have there own main.js file with the Angular Core files included.今天,他们都有自己的 main.js 文件,其中包含 Angular Core 文件。 Since all applications use the same Angular version we would like to extract the Angular Core code and share it (externalize it) between all the applications.由于所有应用程序都使用相同的 Angular 版本,我们希望提取 Angular Core 代码并在所有应用程序之间共享(外部化)它。 This would reduce the download size.这将减少下载大小。 (How) is this possible? (这怎么可能?

我可以建议将您的“应用程序”重构为角度模块(延迟加载),并且所有这些模块都成为单个角度应用程序的一部分吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM