Running HTML5 app that uses requirejs and requires same origin disabled

3 views
Skip to first unread message

jle...@cvaconsulting.com

unread,
Jul 17, 2013, 11:02:54 AM7/17/13
to node-...@googlegroups.com

So I think have a problem for running my app using nw:

  • My app uses requirejs
  • My app makes XHR calls to domains (not fixed, depends on the user using the app)

As I understand, NW disables the same origin policies for Node frames but requires that nodejs must be set to true, the problem is that I had to disable nodejs because my app uses requirejs

Is there any way for making my app work in this scenario? I can't modify my requirejs library by the way

Roger

unread,
Jul 17, 2013, 11:15:22 AM7/17/13
to node-...@googlegroups.com
Are you referring to the name conflict of 'require()' between node and RequireJS?

See https://github.com/rogerwang/node-webkit/wiki/faq-name-conflict

Roger


--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jle...@cvaconsulting.com

unread,
Jul 17, 2013, 11:53:34 AM7/17/13
to node-...@googlegroups.com
Yes, thanks for point that solution, it didn't work as expected to me because I use the requirejs text plugin that has some weird code.

I had to add this:

require.nodeRequire = window.requireNode;

additionally before the require.config .... for made it works

Regards
Reply all
Reply to author
Forward
0 new messages