Created
October 3, 2012 08:29
-
-
Save lennym/3825800 to your computer and use it in GitHub Desktop.
Require JS oddness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this works | |
define(function (require) { | |
var a = require('a'); | |
return a; | |
}); | |
// this fails, and I have no idea why | |
define(function (require) { | |
var a = 'a'; | |
var b = require(a); | |
return b; | |
}); | |
// this also fails | |
define(function (require) { | |
var a = require('a'+''); | |
return a; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment