i've seen a few discussions about this but i can't get it to work in my version. I know why we need to add the following javascript before we execute the requireJS:
<script type="text/javascript">
window.requireNode = window.require;
window.require = undefined;
</script>
so that the window require variable is available for requireJS to use and for node you can use the requireNode variable. But when i want to require the nw-gui module it fails ... i think somewhere deep inside it is still using window.require which executes requireJS code now. Any idea how to fix this?
A temporary fix i found was adding this:
<script type="text/javascript">
window.requireNode = window.require;
window.gui = window.requireNode('nw.gui');
window.require = undefined;
</script>
also defining the gui as a window variable before requireJS is loaded then later in the code i can access the gui module through window.gui.
kind regards,
Daan