jrburke/r.js — Issue #38: module include does not work with "empty:" dependencies
Author: ArturDorochowicz
Created: 2011-11-12 17:01:05+00:00
State: open

In my setup I see that "included" modules are in fact not included in the target file, their dependencies are, though.
My setup is r.js 1.0.1 with node 0.6.1 on Windows 7 x64.
The outcome of this problem is similar to what is described in this thread: http://groups.google.com/group/requirejs/browse_thread/thread/2fc8a1de59b9a129/

I have narrowed it down to the following scenario:
/public
/public/main.js
/public/include-not-working.js
app.build.js

where both modules depend on "empty:" modules:

/public/main.js:
require(['empty1'], function () { });

/public/include-not-working.js:
define(['empty2'], function () { });

the build file app.build.js:
({
baseUrl: 'public/',
optimize: 'none',
paths: {
'empty1': 'empty:',
'empty2': 'empty:'
},
modules: [{
name: 'main',
include: ['include-not-working']
}]
})

The build output build.txt is:

main.js
----------------
main.js

Expected the list to also contain 'include-not-working.js"

Problem seems to be triggered by 'empty:' modules in dependencies.