Skip to content

Instantly share code, notes, and snippets.

@lennym
Created October 3, 2012 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lennym/3825800 to your computer and use it in GitHub Desktop.
Save lennym/3825800 to your computer and use it in GitHub Desktop.
Require JS oddness
// 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