These are chat archives for systemjs/systemjs

12th
Jul 2016
Michael Bøcker-Larsen
@mblarsen
Jul 12 2016 01:26 UTC
Sure @Munter what does the tool do?
Peter Müller
@Munter
Jul 12 2016 06:25 UTC
@mblarsen I'm crossing my fingers that I've been good enough in the readme. https://github.com/Munter/express-systemjs-translate
Michael Bøcker-Larsen
@mblarsen
Jul 12 2016 07:09 UTC
@Munter I guess this baseUrl translates to baseURL for the System.config()?
baseUrl: process.cwd(),
@Munter Looks nice. It is not that trivial to set up, so with a module like this I do believe you can save a lot of time. Nice work.
Unable to test it right now sorry
Peter Müller
@Munter
Jul 12 2016 07:13 UTC
Correct with the base URL. I'll see of I can make it more explicit
Dominic Watson
@intellix
Jul 12 2016 07:40 UTC
having some issues with SystemJS trying to load a websocket request being made from a file
Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost:4200/ws
Dominic Watson
@intellix
Jul 12 2016 09:41 UTC
I have a file that requires like this: require('./lib/');... but for some reason it's trying to load lib.js instead of lib/index.js
Peter Müller
@Munter
Jul 12 2016 10:18 UTC
@intellix Looks like a node module. Node can do this because it has file system access and can discover the index file by trial and error. A browser module loader can't do this. So you have to configure systemjs to load lib/index.js when libis imported in that module
Dominic Watson
@intellix
Jul 12 2016 10:19 UTC
not possible to make it just try index.js when it encounters a folder?
Peter Müller
@Munter
Jul 12 2016 10:19 UTC
Ideally when you find the right configuration you can PR that back to the modules package.json for jspm to pick up. Or if the module owner doesn't care for jspm you can submit your override to the jspm override repository
Dominic Watson
@intellix
Jul 12 2016 10:19 UTC
if ends with /, then load index.js
I thought that was what the packages main property was for
Peter Müller
@Munter
Jul 12 2016 10:22 UTC
You might have a setup where the main is /index.js and inside it is a require('./lib') call. main will not help systemjs resolve the lib file
Dominic Watson
@intellix
Jul 12 2016 10:23 UTC
but shouldn't require('./lib') be lib.js and require('./lib/') be ./lib/index.js? :D
Michael Bøcker-Larsen
@mblarsen
Jul 12 2016 10:25 UTC
@intellix my node-require logic says that as well :)
However this is not node :)
Dominic Watson
@intellix
Jul 12 2016 10:28 UTC
that seems to me to be basic directory requiring though :D why wouldn't we want to mimic the same thing?
I don't know when you'd ever want to have require('./lib/') load ./lib.js... if we didn't want to do directories, that in my mind should do ./lib/.js :D
trailing slash has always meant directory right? I'm really confused :D
Peter Müller
@Munter
Jul 12 2016 10:31 UTC
With the trailing slash I tend to agree. On the other hand defaultJsExtensions is set to false by default, so most likely what you'd get from the web server would be index.html in that case, which would likely give you a 404
Dominic Watson
@intellix
Jul 12 2016 10:32 UTC
having a massive headache working with SystemJS :S trying to load @horizon/client and it requires express.io-client which in turn requires about another 5 modules, which probably each require like 5 modules themselves :D
is this what JSPM helps with? like in my mind, I just want to include a library, but have to spend hours mapping all of their dependencies as well. I refresh the page and get 404s, then I add those, then get more 404s and add those
Peter Müller
@Munter
Jul 12 2016 10:42 UTC
This is exactly what jspm helps with
Peter Müller
@Munter
Jul 12 2016 10:52 UTC
I don't see any mention of express.io-client anywhere in the distributed files of @horizon/client
I do see it depended on in the package.json though. Seems like a misconfigured dependency from the author
I would open an issue for that. Node clients aren't getting any benefit from downloading crap they don't need either
Dominic Watson
@intellix
Jul 12 2016 13:13 UTC
I believe that's in the next branch, but inside the 1.1.3 tag I think it's correct
Peter Müller
@Munter
Jul 12 2016 13:17 UTC
I grepped the source code of the 1.1.3 npm package. No usage of express.io-client
Peter Müller
@Munter
Jul 12 2016 13:34 UTC
Hmm. Grep fail apparently
Andrew Stoker
@AStoker
Jul 12 2016 15:39 UTC
Is anybody here having issues with Aurelia and SystemJS still? We're having issues when we're loading up plugins in Aurelia, and i've traced it down to the instantiate hook in SystemJS where the module that's returned is actually just the function (instead of the result of the function)
DanSimchi
@DanSimchi
Jul 12 2016 15:47 UTC
Hi, Is anyone here worked with winston and systemjs? configured the map and the package . When I'm import from winston I'm getting lots pf ERR_FILE_NOT_FOUND.
flapenguin
@flapenguin
Jul 12 2016 17:32 UTC
Hi, is there's any documentation about using wildcards in bundles?