Possibility to create a single bundle for SystemJS loader in AOT mode
See original GitHub issueI’m submitting a…
[x] Feature request
Current behavior
Even when possible to run in AOT mode … explanation here https://github.com/Ks89/angular-modal-gallery/issues/109, it means that 2 files have to be loaded … angular-modal-gallery.umd.min.js
and angular-modal-gallery.ngfactory.js
. It means that it is a problem to create a single bundle with all necessary files.
Expected behavior
A single bundle with angular-modal-gallery.ngfactory.js
and angular-modal-gallery.js
or an easy way to do it. Right now the module format of angular-modal-gallery.js
is different … es2015
then the format for angular-modal-gallery.ngfactory.js
.
The same situation when using PrimeNG components allows to create a single bundle … for example for slider
component … bundling slider.ngfactory.js
and slider.js
directly without any changes because both use the same module format.
What is the motivation / use case for changing the behavior?
Easy using of angular-modal-gallery
component in AOT mode.
Environment
- Node version: any
- Platform: any
- Angular version: 5.1.0
- Browser: any
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
@Ks89 … using SystemJS is a combination of historic evolution of our projects and the necessity of a shared bundle (which would contain tree-shake-able resources from Angular libs, RxJS, …) for several standalone apps. Now CLI is not able to do that … each application is a monolithic app (all necessary resources are included -> duplicates across those apps).
With SystemJS we can use a browser cache to share the resources (Angular libs, RxJS, …) among those apps … and these resources are not part of those apps.
This is a temporary solution with
robust
solution on the horizon -> usingmono-repo
and ABC concept but this is still in a bit early stage and not a real tool-set for a production environment yet.Ok. Thank u for the explanation. Feel free to close the issue.
However, why are you using SystemJs instead of angular-cli or a pure Webpack config?