nw.js
nw.js copied to clipboard
Can't require a file relative to the index.html
This is how I am requiring the file from index.html:
<script>
require('./daemon/init')();
</script>
I have a folder called daemon/ in that same place and inside I have the init.js file that looks like this:
module.exports = function() {
console.log('Daemon starting!');
};
Instead of everything working, the console shows this error when trying to require the file:
