unscriptable/curl — Issue #28: "define" dependencies with absolute paths not working -- paths override makes no difference
Author: asilvas
Created: 2011-10-18 19:16:58+00:00
State: open

Same issue with relative paths (Issue 21).

This is proving to make development of new modules challenging, as the framework is "live", but modules in development still need to point to this framework. I don't seem to have a good way to override dependencies without pushing them to the live environment too.

More importantly, here's some code to bring this situation to light:

```javascript

```

As for the contents of "indev-module.js":

```javascript

define("shared/indev-module", ["css!shared/indev-module/indev-module.css"], function () {

// define my module

});

```

1. I'd expect my path setting to replace "css!shared/indev-module/indev-module.css" with "css!//localhost/indev-module/indev-module.css", which it does not. It's like the path setting is being ignored entirely. I suspect the part about the path being ignored is the result of having a default "css!" path.
2. So as a work-around (keeping in mind this is for in-development modules), I provided the absolute path of the dependency. So instead of depending on "css!shared/indev-module/indev-module.css" in the "define" call, I provided "css!//localhost/indev-module/indev-module.css". To my suprise, not even this worked -- instead, it tried to add the path to the baseUrl. I'd expect relative ("./" or "../") pathing to work here too (Issue 21), but that isn't as critical of an issue.

As to the 1st issue, this is likely due to using "paths" even for plugins, instead of allowing plugin-based baseUrl's to reside external to "paths" -- Making this change would allow both absolute and relative paths to take priority over plugin baseUrl's. This would be consistent with how plugins now take priority over the baseUrl.

The 2nd issue, from best I can tell, is simply a bug.