These are chat archives for systemjs/systemjs

13th
Dec 2017
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 08:08
... does anybody know what means "bundle"; on the beginning of a bundle created using SystemJS Builder builder.bundle('...', '...', options);?
Aluan Haddad
@aluanhaddad
Dec 13 2017 19:15
@mlc-mlapis It is a hint to the loader that the file contains code that is already built. The paths have been reified in named System.register calls.
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 19:57
@aluanhaddad ... yeap ... but in some cases the content starts System.registerDynamic("aot/app/app.component.js",[... and sometimes "bundle"; System.registerDynamic("rxjs-spy/operators/tag", [... and I don't know what affects this behaviour ...
Aluan Haddad
@aluanhaddad
Dec 13 2017 19:58
That is at the top of a file?
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 19:58
@aluanhaddad ... yes, just on top ...
Aluan Haddad
@aluanhaddad
Dec 13 2017 19:58
Also, you shouldn't be building to CommonJS anyway
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 19:59
@aluanhaddad ... you prefer what format ... ?
Aluan Haddad
@aluanhaddad
Dec 13 2017 20:00
"es2015" or "system"
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 20:18
@aluanhaddad ... "es2015" I can't because it has to be directly usable even for IE 11 ... and I thought that "system" leads to a larger size then "cjs"
Aluan Haddad
@aluanhaddad
Dec 13 2017 20:23
You are bundling it anyway so it will be inlined into a single file and optimized. Also, the CommonJS target, especially in TypeScript, does not represent the fidelity of the ESM it was transpiled from. For example, circular references between your own modules will often not work correctly under TypeScripts CommonJS output.
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 20:25
@aluanhaddad ... OK, I will try some additional tests ... to be able to compare ...
Aluan Haddad
@aluanhaddad
Dec 13 2017 20:26
Is the presence of "bundle" an issue?
Miloš Lapiš
@mlc-mlapis
Dec 13 2017 20:57
@aluanhaddad ... not at all. Just it would be nice to know the conditions when it is placed and when not. :smile: