These are chat archives for systemjs/systemjs

30th
Nov 2018
Paul Melnikow
@paulmelnikow
Nov 30 2018 15:25
@guybedford hey, i wanted to pick up the thread from https://github.com/systemjs/systemjs/pull/1885#issuecomment-443231684
so the idea is that the named registration should just be an "empty module" and not the "last named registered module" in the bundle
i'm new to systemjs and i'm afraid i don't understand that. could you clarify?
Guy Bedford
@guybedford
Nov 30 2018 16:30
@paulmelnikow the issue with that one is that named registrations are designed so that there can be many in the same file. So the problem is that if you import a file with many named registrations - which one should become the value that is returned for that file. Traditionally what is done here is to treat the file as a "bundle" which itself is just an empty module, so you need to do a tiered load like https://github.com/systemjs/systemjs/blob/master/test/browser/named-register.js#L3
It would be interesting to know how you are getting that error though that isn't applying in the above test case already
so a test would help either way I think
thanks for looking into this
Paul Melnikow
@paulmelnikow
Nov 30 2018 17:06
if there are many in the same file, does that mean there are several calls to System.register()?
Paul Melnikow
@paulmelnikow
Nov 30 2018 19:41
huh. how does the test in test/browser/named-register.js get run? npm test doesn't seem to do it
the other test targets in package.json don't seem to run it either
Paul Melnikow
@paulmelnikow
Nov 30 2018 19:58
ah, i see, they run in the browser
right. so the browser tests use system.js. i can replicate the error if i switch to s.js
Guy Bedford
@guybedford
Nov 30 2018 20:01
ahh perfect, thanks so much for catching that... definitely a bug then @paulmelnikow
Paul Melnikow
@paulmelnikow
Nov 30 2018 20:01
is there an automated mechanism to trigger the browser tests?
Guy Bedford
@guybedford
Nov 30 2018 20:03
no they're manual