jrburke/requirejs — Issue #152: r.js jsonp can not optimized
Author: zjhiphop
Created: 2011-12-20 11:53:07+00:00
State: open

Hi,
I just tried a jsonp with requireJS.But when i use nodeJS to optimize JS will occur a error:
My code :
```javascript
require(["js/helper/text!package.json?callback=define"], function(data) {
//The dta object will be the API response for the
//JSONP data call.
console.log(data);
});
```
when i run cmd :
node ../lib/r.js -o app.build.js
```javascript
Error: Error: Error evaluating module "undefined" at location "E:/EF_Work/ET-Ref
actor/ET-Refactor/build-client/script/helper/text.js":
Error: UNKNOWN, unknown error 'E:\EF_Work\ET-Refactor\ET-Refactor\build-client\p
ackage.json?callback=define'
fileName:E:/EF_Work/ET-Refactor/ET-Refactor/build-client/script/helper/text.js
lineNumber: undefined
http://requirejs.org/docs/errors.html#defineerror
In module tree:
script/main
js/helper/text
```

So if i want to do this,how should i do?