These are chat archives for systemjs/systemjs

21st
Apr 2015
Tero Teelahti
@teelahti
Apr 21 2015 04:50
Ok, thanks for the info. What puzzled me that I was not able to get this working even when I changed to full names such as d3/d3.min. I must have done something wrong.
Guy Bedford
@guybedford
Apr 21 2015 09:47
@teelahti you should see the request go through in the network tab, and it should be straightforward to see how the URL is incorrect here
Tero Teelahti
@teelahti
Apr 21 2015 11:16
I did check the network, but the behavior was inconsistent, and I did not find the cure. The requests were correct when I changed to full names, but Systemjs did not load the files in correct order anymore - nv.d3.js (above example) loaded before d3.js, which of course threw an error. My first impression was that it had something to do with me using alias names on module imports, but full names on depCache. I'll try to debug it better someday, will let you know if there is a bug.
Guy Bedford
@guybedford
Apr 21 2015 11:32
ensure you shim your dependencies properly to avoid possible out-of-order loading
its easy to think everything is ok when a plugin usually loads after its host module
but you need to explicitly shim that dependency to rely on it and not have edge cases come up
Tero Teelahti
@teelahti
Apr 21 2015 11:37
I thought I was ensuring the dependency tree is always correct with the depCache :-).
Guy Bedford
@guybedford
Apr 21 2015 11:38
no depCache is only about flattening the loading profile
shim deps are for defining the tree
Tero Teelahti
@teelahti
Apr 21 2015 11:41
I have missed that. So System.meta['nvd3'] = { deps: ['d3'] }; it is then. Thanks.
Guy Bedford
@guybedford
Apr 21 2015 11:43
great, I can see how that could be confusing, but yes they're for very different purposes - one is a production optimization on normalized names, the other is for defining module dependency relations, and permits normalization
Nick
@NicholasGW
Apr 21 2015 12:38
Is there a way to use plugins during bundling? Specifically for JSX as I'm using a React app. I'm assuming it would work if I made everything ES6 via babel, but a lot of my modules in an existing project are CJS
Guy Bedford
@guybedford
Apr 21 2015 14:01
Yes a Babel plugin will bundle. For an example see https://github.com/systemjs/builder/blob/master/test/fixtures/test-tree/jsx.js
Nick
@NicholasGW
Apr 21 2015 14:05
Ah excellent! I was moreso thinking having the JSX plugin translate my ES5 React classes during the bundling process to keep the references intact and prevent an intermediate step
thanks for the example :)
Igor
@PinkaminaDianePie
Apr 21 2015 14:28
what does it mean: "Multiple anonymous System.register calls in the same module file"?
i have only one "System.register" in a file