These are chat archives for systemjs/systemjs

12th
Jul 2015
Sharon (Sean) Rolel
@Mosho1
Jul 12 2015 04:30
can I ask systemjs-builder to not trace a certain module when using builder.trace?
Micah Zoltu
@MicahZoltu
Jul 12 2015 04:55
Is it possible to have one mapping that doesn't get a default .js extension appended when "defaultJSExtensions": true, is used?
I have a resource that is mapped to a URI and the URI doesn't have a .js extension (the fetched file is a JavaScript file).
Guy Bedford
@guybedford
Jul 12 2015 10:17
@Zoltu use the SystemJS packages configuration defaultExtension: false option
System.config({
  packages: {
    'resource/base/folder': {
      defaultExtension: false
    }
  }
});
System.import('resource/base/folder/resource');
James Hill
@jamiehill
Jul 12 2015 15:14
@EladRK Hi Eral, that cdn you quoted doesn't seem to have the latest system build 0.18.4. Any idea where I could get this?
Micah Zoltu
@MicahZoltu
Jul 12 2015 18:02
@guybedford How can I do that when the resource in question is coming from the internet?
System.config({
    "meta": {
        "https://proxy.zoltu.io/stripe/checkout": {
            "format": "global"  // Prevents misdetection as AMD
        }
    },
    "map": {
        "stripe-checkout": "https://proxy.zoltu.io/stripe/checkout"
    }
});
import stripeCheckout from 'stripe-checkout';
In this scenario, I'm not sure what to put for the key in the packages map.
The same key as I put for the meta map?
Note: I don't just try and find out because I went and updated the server to serve with a .js extension, but I would like to know for future reference.
Guy Bedford
@guybedford
Jul 12 2015 18:09
@Zoltu https://proxy.zoltu.io/stripe would be the package, checkout the module
System.config({ packages: { 'https://proxy.zoltu.io/stripe': { defaultExtension: false } } })
Micah Zoltu
@MicahZoltu
Jul 12 2015 18:11
Thanks!
Paul Everitt
@pauleveritt
Jul 12 2015 20:12
Hi everybody, just getting started and have what is likely a common question but I can't find the answer
I don't see anything in Production Workflows about how this would get eliminated
Using Babel generates a request to babel-core/browser.js, which is a 2 MB file...the .min is still 1.3 MB
Micah Zoltu
@MicahZoltu
Jul 12 2015 20:22
@pauleveritt I'm waiting for the a response to effectively the same question.
jspm/jspm-cli#912
Perhaps comment there indicating that you experience a similar issue with Babel and ES6.
Paul Everitt
@pauleveritt
Jul 12 2015 20:27
Thanks @Zoltu
I saw a different issue saying to load browser-polyfill.js manually
That issue was jspm/jspm-cli#535
Paul Everitt
@pauleveritt
Jul 12 2015 20:53
@Zoltu after some investigation, turned out I needed to do bundle-sfx to get the smaller runtime
Micah Zoltu
@MicahZoltu
Jul 12 2015 20:53
@pauleveritt Were you sending ES6 down to the client previously?
In my case, despite bundling I am still sending TS down to the client, which is why it needs the TypeScript compiler.
Are you suggesting that if I bundle-sfx I'll stop sending TS to the client?
Or rather, the client will stop asking for TS.
Paul Everitt
@pauleveritt
Jul 12 2015 20:56
I believe so, but the bundle I generated included the app
Micah Zoltu
@MicahZoltu
Jul 12 2015 20:59
Mine as well, but for some reason the browser still asked for the original TypeScript files, despite them being bundled in.
I'll fool around with bundle-sfx later and see if anything comes out of it.
Paul Everitt
@pauleveritt
Jul 12 2015 22:19
@Zoltu of course as soon as I get in the car, I see the light..if you want to send un-transpiled code to the browser, you have to send over the big runtime (I think)
Micah Zoltu
@MicahZoltu
Jul 12 2015 22:51
@pauleveritt Yeah. Bundling is supposed to transpile, so you don't have to send over the compiler/transpiler.
Unfortunately, it doesn't seem to all work correctly.