These are chat archives for systemjs/systemjs

26th
Jun 2015
Micah Zoltu
@MicahZoltu
Jun 26 2015 01:38
@teohhanhui Are you using ES6 by chance? If so it is easy. I'm not sure how to do it in ES5.
import { foo } from 'foo'; where foo depends on jquery: $ will not be available in that document.
Teoh Han Hui
@teohhanhui
Jun 26 2015 08:25
@Zoltu It's still leaking globals...
once you load the jQuery script.. it leaks globals.. unless u do some magic to isolate the global object, or call noConflict to do the cleanup
Ronn
@ronnross
Jun 26 2015 18:38
Is there a way to set an environment variable during the system build that my app can check for to turn off features?
Tim Jacobi
@timjacobi
Jun 26 2015 18:50
Hello! I'm looking to write my code in ES6, transpile to ES5 using Babel, then minify and then load via SystemJS. Is that realistic and where can I find a good tutorial to start please? Google didn't really help.
Steffen Giers
@gearsdigital
Jun 26 2015 18:52
@timjacobi Try this: https://github.com/jspm/demo-es6
Tim Jacobi
@timjacobi
Jun 26 2015 18:53
Thanks @gearsdigital I'll have a look!
"Bundle into a single file for production" ... that's exactly what I don't want. My app is about 800k. Putting that all in 1 file is carnage.
Charles Patton Jr
@buddyp450
Jun 26 2015 19:12
Can someone take a look at #552 and let me know what they think? I'm on the verge of restructuring all of my import statements to be relative to the folders instead of relying on SystemJS config. :(
I'd like to get a non-newbie opinion before I go through the trouble and then find out that I just missed something fundamentally obvious.
I'm actually back on node v0.10.x
Charles Patton Jr
@buddyp450
Jun 26 2015 19:51
@guybedford in your projects that use SystemJS paths, how do you resolve the dependencies of your modules when server-side?
Steffen Giers
@gearsdigital
Jun 26 2015 20:00
@timjacobi Don't forget to add the --minify flag :smile:
Tim Jacobi
@timjacobi
Jun 26 2015 20:33
@gearsdigital with 800k I was referring to the minified version. This is including the libraries of course.
Steffen Giers
@gearsdigital
Jun 26 2015 20:46
@timjacobi 800k minified Javascript? Not at all small :smile:
@timjacobi You could also create an self executing bundle jspm bundle-sfx --minify src/js/main app-bundle.js Which is independent of the SystemJS loader entirely.
Rob Wormald
@robwormald
Jun 26 2015 22:31
@timjacobi https://github.com/robwormald/ng2-jspm-seed/blob/master/gulpfile.js couple of different options there, including breaking it into 2 bundles (lib and app)
Tim Jacobi
@timjacobi
Jun 26 2015 22:38
cheers rob @robwormald I'll have a look
Rob Wormald
@robwormald
Jun 26 2015 22:49
fwiw i've found the best performance so far to be an sfx bundle, loaded async