These are chat archives for systemjs/systemjs

27th
Jan 2017
Ricky Blankenaufulland
@ZoolWay
Jan 27 2017 09:24
this answer my question about multiple/chaining plugins: systemjs/systemjs#1053 TLDR: no
Andrei Balmus
@abalmush
Jan 27 2017 10:30
Hello guys quick question, if BundleA depends on BundleB can I tell SystemJs to wait till bundleA will be loaded, then load bundleB ?
Gert Sønderby
@gertsonderby
Jan 27 2017 10:33
@abalmush It should wait to execute BundleA until BundleB is executed. To wait for the load, something like this might work: System.import('BundleB').then(moduleB => { System.import('BundleA').then(moduleA => {/*do stuff with module A and moduleB */}););
System.import('BundleB')
.then(moduleB => {
    System.import('BundleA')
    .then(moduleA => {
        /*do stuff with moduleA and moduleB */
    });
});
Andrei Balmus
@abalmush
Jan 27 2017 10:35
Just wondering if it possible to do using jspm config. But this option also works for me I think, thanks @gertsonderby !
Gert Sønderby
@gertsonderby
Jan 27 2017 10:35
If you want it to lazy-load, then you need someone other than me to help you. :-)
Jonathan Melville
@jonathanmelville
Jan 27 2017 16:13

Hi all, dumb question (probably) but is using the builder a requirement for production? We want to load individual modules over http2 as this seems perforable to bundling everything into one file. However when swapping out system.js for system-production.js, everything breaks with errors like:

ReferenceError: require is not defined
Error: Module instantiation did not call an anonymous or correctly named System.register.

What am I missing about prepping the app for production? Doesn't seem like you can just swap out system.js for system-production.js and we didn't really want to bundle everything one one file. How can we use the production build without bundling?

Gordon L. Hempton
@ghempton
Jan 27 2017 18:32
Is anyone successfully using the new System.js release?
0.20.2 fixed a package resolution issue, but now I am hitting a out of memory issue when using builder to create a bundle
Gert Sønderby
@gertsonderby
Jan 27 2017 18:38
@ghempton Guess a full rewrite comes with its problems. I had a whole number of problems, myself. Some PEBKACs, sure, but enough to back out of the upgrade.
Gordon L. Hempton
@ghempton
Jan 27 2017 18:42
yeah most likely going to have to back out for now as well
hard to diagnose the issues
Gert Sønderby
@gertsonderby
Jan 27 2017 18:43
No mistake, I want the new version. Also, new JSPM. But I just don't have the time to unpick everything right now.