I'm currently writing a web app that I later intend to deploy using node-webkit. I want to use as little node.js as possible so that I have the option to easily deploy to the web without having to rewrite large portions of the code.
I'm using Jam.js as a package manager. Obviously there is the issue of node.js's require
conflicting with require.js's require
. Using requirejs
instead of require
seems to be a great option. However, Jam.js compiles the require.config.js-file and uses require
(instead of requirejs
) inside of it.
Currently, I have to do window.require = undefined;
to make Jam.js's require.js work in node-webkit.
Is there a way to make Jam.js compile the require.config.js-file using requirejs
instead of require
?
Or is there a different solution that lets me use both Jam.js and node.js's require
without having to do something like window.require = undefined;
? I find the solution presented in the node-webkit FAQ not very satisfying.
Thanks for your help!