jrburke/r.js — Issue #125: Simplified CJS wrapped files do not work after a build when not part of build layer
Author: jrburke
Created: 2012-03-06 21:29:45+00:00
State: open

The build normally runs Uglify to minify all the JS in an appDir type of optimization. However, if a simple CJS wrapped file is not part of a build layer, after uglification, the require call is mangled:

```javascript
define(function(a) { a('jquery'); });
```

This will break if jquery is not already loaded.

So, need to scan JS files for this wrapping and convert to dependency arrays, as modules are done in a built layer, if minification of the file is to be done.

Marking for 1.0.8, but it may get pushed to 1.1 depending on how fast the 1.1 work goes. I would like 1.1 to be the next release, but if it is taking too long, will do a 1.0.8 maintenance release.