These are chat archives for systemjs/systemjs

18th
Aug 2015
Matt Ginzton
@metamatt
Aug 18 2015 00:42
is anyone using the SystemJS builder in conjunction with defaultJSExtensions? I have an app that loads fine with SystemJS (0.18.6) in developer mode, but if I run it through my build script, the resulting bundle in the browser starts getting 404s on paths to .js modules without the .js suffix.
I thought I'd just bite the bullet and turn off defaultJSExtensions now but then I saw https://github.com/systemjs/systemjs/issues/490#issuecomment-109563826: jspm still requires defaultJSExtensions until 0.17
Christian Karl Bernasko
@chrisber
Aug 18 2015 05:59
Hi, How can I get the text-plugin to work with typescript? I'm using import htmlSource from 'templates/tpl.html'; and the compiler complains error TS2307: Cannot find module './tpl.html'??
Christian Karl Bernasko
@chrisber
Aug 18 2015 06:10
sorry never mind frankwallis/plugin-typescript#21
Matthew Bauer
@matthewbauer
Aug 18 2015 17:21
@guybedford I opened an issue in whatwg/loader#69 about CSP. I don't think there's a lot to be done except for vendors to provide a builtin "instantiate" that SystemJS can use.
Until then "unsafe-eval" will have to do.
Matt Ginzton
@metamatt
Aug 18 2015 18:27
FWIW I found my problem trying to use the SystemJS builder and tripping over defaultJSExtensions. My build script was accidentally treating config.js like all other JS, passing it to builder.build and so it was getting wrapped with the SJS AMD-ish module boilerplate, so the <script src=config.js> was registering a module instead of actually configuring SystemJS. So System.defaultJSExtensions was never getting set (and that was only the first problem of what would have been many problems).