These are chat archives for systemjs/systemjs

27th
Apr 2015
Jon Stevens
@lookfirst
Apr 27 2015 01:15
I’ve got a weird behavior happening. systemjs is trying to load resources as file:/ urls. Any ideas why this might happen?
Oh, never mind, it is coming in from the sourceMapping for some reason. weird.
Chris Draycott-Wheatley
@chrisdwheatley
Apr 27 2015 10:47
IIRC I saw @guybedford mention that SystemJS was a shim for an upcoming browser module loading spec, is this the spec in question? https://whatwg.github.io/loader/
Sharon (Sean) Rolel
@Mosho1
Apr 27 2015 11:24
are everyone's systemJS apps working with phantomjs?
Mike Haas
@mikehaas763
Apr 27 2015 14:22
Is a System.register module supposed to be executed every time it's imported from another ES6 module?
Guy Bedford
@guybedford
Apr 27 2015 14:23
@mikehaas763 no modules are only executed once
Mike Haas
@mikehaas763
Apr 27 2015 14:23
@swirlycheetah yes
@guybedford Ok. That means I'm experiencing some odd behaviors then because I'm seeing from console.log and breakpoints a module being executed twice
Guy Bedford
@guybedford
Apr 27 2015 14:24
@mikehaas763 you'll probably find you've requested the same module under two different names
this could happen if you have map config for example:
map: {
  jquery: 'dist/jquery'
}
and then do System.import('jquery'), System.import('dist/jquery')
actually no sorry I'm talking rubbish, it would apply for paths config only not map config
This message was deleted
Mike Haas
@mikehaas763
Apr 27 2015 14:25
I don't have any config at this point. The two places where the module is imported look like this
// file1
import ContactsModule from '../Components/Contacts/ContactsModule';
// file2
import ContactsModule from '../Contacts/ContactsModule';
Guy Bedford
@guybedford
Apr 27 2015 14:26
it could be worth having a look at Object.keys(System._loader.modules) to see where the duplicate names are coming in
Mike Haas
@mikehaas763
Apr 27 2015 14:31
@guybedford A little weird, I have two similar keys with one character in a different case.
"ClientCenter/Components/Contacts/ContactsModule"
"ClientCenter/components/Contacts/ContactsModule"
Yet there is no occurrence with a lowercase components/Contacts anywhere in my codebase
Mike Haas
@mikehaas763
Apr 27 2015 14:36
Ahh. I see. On a different module higher up in the directory hierarchy I had imported a module with a lowercase "components". I'm guessing then using relative paths which depend on the path from an import higher up that a lowercase "components" was being used in several places
Guy Bedford
@guybedford
Apr 27 2015 14:37
sure, good to know that catch
Nick
@NicholasGW
Apr 27 2015 19:04
Just working on checking some licenses for deps, is there an easy way to show a dependency tree? I know I can use inspect but it isn't showing as many packages as I have
config.js might work but it's alphabetical etc rather than a tree