unscriptable/curl — Issue #37: paths or "css!" plugin bug with absolute paths (v0.5.3)
Author: asilvas
Created: 2011-12-13 16:19:50+00:00
State: open

Not sure how I've gotten away without discovering this bug until now, but it has proven troublesome with existing prod code. Here's the issue in a nutshell:

```javascript
curl = {
baseUrl: "//cdn1/", // default path
paths: {
"css!": "//cdn2/" // default path for css includes
}
};
```

The above script (a variation thereof anyway) is built into our master curl include. Now performing the following in the App:

```javascript
require("css!/css/test.css"); // instead of hitting the absolute path (instead of the path override since it is absolute), it is hitting //cdn2//css/test.css
```

It is entirely possible the issue I noted above is just a variation of the same problems in some of the other 0.5.3 issues reported, and may not even be specific to the "css!" plugin, but wanted to make aware just in case.

The only temporary workaround I could come up with for now (that is working so far) is:

```javascript
curl = {
baseUrl: "//cdn1/", // default path
paths: {
"css!": "//cdn2/" // default path for css includes
, "css!/: "/" // if prefixed with "/" use that instead
}
};
```