systemjs / plugin-css

CSS loader plugin
MIT License
92 stars 60 forks source link

Promise never rejected on missing files #63

Closed andreas-wagner closed 9 years ago

andreas-wagner commented 9 years ago

The following call to load a file that does not exist always results in the System.import Promise to be fulfilled. But since something bad happened it should be rejected!

System.import('./styles/does-not-exist.css!').then(
  function(){console.log('ok');},    // onFulfilled
  function(){console.log('oh no');}  // onRejected
);
// => 'ok'

If the promise would be rejected, I could try something else or notify the user or whatever. But as it is now I do not even know that it failed at all.

guybedford commented 9 years ago

Thanks, I've fixed this in 0.1.18.