question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility to create a single bundle for SystemJS loader in AOT mode

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mlc-mlapiscommented, Dec 17, 2017

@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 -> using mono-repo and ABC concept but this is still in a bit early stage and not a real tool-set for a production environment yet.

0reactions
Ks89commented, Dec 16, 2017

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create AOT/JIT compatible Angular 4 library ... - LinkedIn
You want to have watch-mode for library builds (including AOT build). ... SystemJS I definitely needed to export it as one JS file...
Read more >
Using SystemJs and Webpack on an MVC application in ...
I am using Visual Studio 2017 to develop an Angular 4.1 SPA application that is hosted in an MVC application (.Net 4.6). I...
Read more >
ag-Grid (Vue): Angular - Building with SystemJS
Our application will be a very simple one, consisting of a single Module, a single Component and a bootstrap file, as well a...
Read more >
Chapter 2. Getting started with Angular - liveBook · Manning
Let's create an index.html file, which will start by loading the required Angular scripts, the TypeScript compiler, and the SystemJS module loader.
Read more >
How to bundle many TypeScript files using SystemJS - Teklog
Typescript configuration · module must be set to system, to use the SystemJS run-time module loader · outFile can point to any file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found