These are chat archives for systemjs/systemjs

8th
Feb 2015
Ben Monro
@benmonro
Feb 08 2015 08:54

I'm seeing a strange 404 when I try to use the text plugin. Am I missing something? Why would the url work if I copy it from the console error but System seems to think it's a 404?

System.paths["templates/*"] = '/templates/*.txt';
System.import("templates/blah.txt!text").then(function(f){console.log(f);});

Output from console:
b {_handler: v, then: function, catch: function, _beget: function}
es6-module-loader.src.js:2504 GET https://ben.testna.me:3000/templates/blah.txt. 404 (Not Found)
es6-module-loader.src.js:139 Potentially unhandled rejection [11] Error loading "templates/blah.txt!text" at https://ben.testna.me:3000/templates/blah.txt.
Not Found: https://ben.testna.me:3000/templates/blah.txt. (WARNING: non-Error used)

if I copy the URL in the error & open this url in another tab there's no 404 and the content comes up fine...

Guy Bedford
@guybedford
Feb 08 2015 10:21
@matthewp the issue is at systemjs/systemjs#276
@benmonro this may be CORS.
ensure you have the correct CORS headers set
allow-access-from-origin: *