{"issue":{"state":"open","created_at":"2011-12-06T12:52:52Z","updated_at":"2011-12-06T14:28:05Z","user":{"gravatar_id":"2e1599d22dce3e1661b6e63e8514b38e","id":155633,"url":"https://api.github.com/users/millermedeiros","login":"millermedeiros","avatar_url":"https://secure.gravatar.com/avatar/2e1599d22dce3e1661b6e63e8514b38e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"I'm trying to load a dependency relative to a plugin file and it doesn't seem to work:\r\n\r\n```js\r\n// main.js\r\nrequire.config({\r\n  paths : {\r\n    awsum : 'lib/require/myAwesomePlugin'\r\n  }\r\n});\r\n\r\n// lib/require/myAwesomePlugin.js\r\ndefine(['./someHelper'], function(helper){\r\n  ...\r\n});\r\n\r\n// foo.js\r\ndefine(['awsum!loadSomethingAwesome'], function(something){\r\n  // this will timeout since \"someHelper.js\" can't be found\r\n});\r\n```\r\n\r\nit's probably because I'm using the path config to create an alias to the plugin location... (I don't like to clutter the `baseUrl` folder with lots of scripts..)\r\n\r\nRelative paths are useful for plugins that uses external dependencies like the [handlebars plugin](https://github.com/SlexAxton/require-handlebars-plugin).","assignee":null,"id":2461737,"number":149,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"relative plugin dependencies + paths config conflict","html_url":"https://github.com/jrburke/requirejs/issues/149","closed_at":null,"url":"https://api.github.com/repos/jrburke/requirejs/issues/149","milestone":null},"action":"created","comment":{"created_at":"2011-12-06T14:28:05Z","updated_at":"2011-12-06T14:28:05Z","user":{"gravatar_id":"4625cc3a305e2a7c2ccb902b5da5de04","id":84763,"url":"https://api.github.com/users/neonstalwart","login":"neonstalwart","avatar_url":"https://secure.gravatar.com/avatar/4625cc3a305e2a7c2ccb902b5da5de04?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"i'm not sure if your expectation is correct.  my original expectation was that a relative dependency should be relative with respect to the url of the calling module.  however, after a LOT of discussion on the amd-implement list (https://groups.google.com/d/topic/amd-implement/xF1BuikRPZ8/discussion), it was agreed that relative references are relative module ids and so './someHelper' resolves to being relative to the 'awsum' module id which leads to a module id of 'someHelper'.  after that, then the id is resolved to a url.  maybe this is causing the issue for you?","id":3032832,"url":"https://api.github.com/repos/jrburke/requirejs/issues/comments/3032832"}}