jrburke/r.js — Issue #119: optimizer forgets about main js when using wire
Author: boulter
Created: 2012-02-24 21:10:41+00:00
State: open

I seem to have encountered a situation when optimizing a single javascript file where the r.js optimizer will not include the main file in the optimized file when one of the required modules uses wire.js

For example, this works:

require([
'module',
],
function(mod) {
// main stuff here

}, function(e) { throw e; })

this does not:

require([
'wire!module',
],
function(mod) {
// main stuff here

}, function(e) { throw e; })

I uploaded a full example at http://ge.tt/91hU86E/v/0?c .

Just run optimize.sh to see the working and non-working example.