These are chat archives for systemjs/systemjs

Apr 2015
Jon Stevens
Apr 04 2015 00:34
Hey all, for those following along with the systemsjs-seed project, I just finished upgrading everything to latest jspm/systemjs. One of the big changes is that now I use babel to compile everything to the babel option of module=system instead of using commonjs. So, if you’re looking at a complete example of how to get up and running quickly with these tools, this is a pretty good starting place.
Justin Garfield
Apr 04 2015 13:18
Hi everyone! I have SystemJS running fine w/ JSPM on my client-side of my application, but I've been struggling for a few hours now trying to get SystemJS to work on the Node.js side of my application. I have installed "systemjs" and "babel" with npm, setup a bootstrap-ish type file as and have tried multiple configuration methods for "System" trying to get it running. If I remove the pathing to the local babel install, then I get an error saying that it cannot find a "babel.js" (I assume this is just the default file it looks for babel in)...If I then keep my path to babel (node_modules/babel/index.js) in the System "paths" configuration property, I end up getting an error when it goes to load babel when it hits the line "module.exports = require("babel-core");" in babel's index.js with the error: "require is not defined" (probably because System has overridden require at this point?). Am I doing something majorly wrong? Maybe I'm missing a small step somewhere? Do I need to include the Babel Polyfill manually or something on the node.js side? Anyone have any ideas where to go from here? Would just really love to have the same loader on both sides of my application. Thanks! :)
Guy Bedford
Apr 04 2015 13:38
@strickn you need to use the browser build of Babel in Node as well
babel: 'node_modules/babel/browser.js'
working on making this completely automatic in the next release
btw it is also advisable to use babel-core instead of babel as it's a smaller install
Justin Garfield
Apr 04 2015 13:42
Ah, alrighty, I'll go give that a shot. Thanks for the input! I saw the mention of browser.js in the docs, but was slightly confused (first time using SystemJS on both client and server for this project). Having a blast using this loader so far on the client...was using Require.js and Curl previously. :)
Justin Garfield
Apr 04 2015 13:52
@guybedford Excellent, that seems to have done the trick, thanks!
Apr 04 2015 16:32
according to this issue #225 , i dont understand the answer. if in my config.js i added "jquery": "//"; i get a Access-Control-Allow-Origin error. so what i have to do? also the sfx build process with jspm failed. "Error loading "jquery" at file://............"