Permalink
Browse files

Update wrapper to prevent unintended circular dependencies

The wrapper code could cause circular dependencies for AMD loaders.
It doesn't include a dependencies argument in the call to
define, which will cause some loaders to scan the factory function for
require calls.
  • Loading branch information...
1 parent 9d89376 commit 351ca4c73561f273e8030363bb5b0f82430b88c4 @jason0x43 jason0x43 committed Dec 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/component-build
View
2 bin/component-build
@@ -122,7 +122,7 @@ builder.build(function(err, obj){
'if (typeof exports == "object") {',
' module.exports = require("' + conf.name + '");',
'} else if (typeof define == "function" && define.amd) {',
- ' define(function(){ return require("' + conf.name + '"); });',
+ ' define([], function(){ return require("' + conf.name + '"); });',
'} else {',
' this["' + name + '"] = require("' + conf.name + '");',
'}'

0 comments on commit 351ca4c

Please sign in to comment.