geelen / jspm-loader-css

50 stars 27 forks source link

fix: request undefined path #27

Open douglasduteil opened 9 years ago

douglasduteil commented 9 years ago

Filter the available dependencies so the pending ones don't get linked

geelen commented 9 years ago

I'm a bit confused what this does. We should really build a test suite for this stuff, any ideas on the best way to go about that?

douglasduteil commented 9 years ago

Hi @geelen

The new loading strategy involves sorting and injecting css asynchronously if no other styles are loaded in a 0.5s period (see https://github.com/douglasduteil/jspm-loader-css/blob/v1.0.1/lib/CSSLoaderDOM.js#L17) . However it gives no guarantee that all the registered styles are done going through the other asynchronous processes ! So this fix is made to filter the styles so only fully resolved styles are injected in the DOM.

douglasduteil commented 9 years ago

Again @geelen. This is a fix for a critical bug because the current code allow compiling class with undefined path. (Ex: .undefined__foo)

douglasduteil commented 9 years ago

For testing I tried some dummy tests with TAPE and I already found some bugs did to no JSPM compiled code

douglasduteil commented 9 years ago

I will be posting it tonight so you can review it