jrburke/requirejs — Issue #151: can't use variable in require function
Author: zjhiphop
Created: 2011-12-20 06:50:14+00:00
State: open

I just tried like this to use dedine:

define(function(require){
var moduler_path="host_name/some_js.js";
var some_js=require(moduler_path);
//some_js will alwarys null,but if i use require("host_name/some_js.js"); will works well
})

After some debug,i find that u use 'cjsRequireRegExp' to match string in require call.But the varible in require call can't match beacuse it is not a string.

So can u update this method to make it can pass a varible?

thanks!