-
Notifications
You must be signed in to change notification settings - Fork 310
wrap: true in requirejs build configuration throws undefined is not a function in the production #22
Comments
You need to post some more info, preferably with your main.js file. |
main.js
config.js
|
I tried to reproduce this, but wasn't able given these two files. Could you take a look a my test repository and see what you need to change to recreate the situation? |
@passy Thanks. I figure out the issue. I used the some UMD pattern to have common code between Client and Server (Node JS) https://github.com/umdjs/umd/blob/master/nodeAdapter.js If i add this file as dependency to any module, then requirejs build changes all define function name to some one letter word. I forked your test repo and reproduce the issue. https://github.com/fizerkhan/webapp-22 Check shared folder for common UMD helper code. |
@fizerkhan I'm now able to reproduce your problem. I made a few changes to the structure to make This is, however, not a problem with the generator. As you said, it depends on the |
@passy Thanks. I will report this issue in RequireJS |
@fizerkhan can you link up the relevant RequireJS issue here in case others are having the same problem. |
I asked this question in RequireJS issue and got an answer from @jrburke |
Gruntfile has wrap: true in requirejs build. After making the built, the final amd script does not work. It throws undefined is not a function. When i debug, it happens in define('backbone', ..)
method. i.e It ends with define method is undefined.
Once i disable wrap:true option, everything is working. why it is happening?
The text was updated successfully, but these errors were encountered: