I'm structuring my app like this:
dev
|-js
| |-C
| | |-app.js
| |-M
| |-folder.js
|-index.html
|-package.json
in index.html, I have
<script type="text/javascript" src="js/C/app.js"></script>
in app.js I have
var folders = require("js/M/folder.js")
When I run this app, I'm seeing:
Uncaught Error: Cannot find module 'js/M/folder.js' module.js:341
Module._resolveFilename module.js:341
Module._load module.js:280
Module.require module.js:367
require module.js:383
window.require
(anonymous function) app.js:6
I've tried using
"js/M/folder"
"js/M/folder.js"
"/js/M/folder"
"/js/M/folder.js"
"./js/M/folder"
"./js/M/folder.js"
"../../M/folder"
"../../M/folder.js"
And it never seems to find the file. I also noticed that the require function object doesn't seem to be the same one in the node documentation, as it has no resolve method attached to it.
Is there something fundamental I'm missing about node-webkit?