I'm finding that it's a pain when moving files around and constantly having to rewrite the file include paths to be relative to their new folder.
I want to avoid this in my browserify code:
var View = require('../../../../base/view');
And do something more in line with requirejs where it knows my base path is js
:
var View = require('base/view');
You should use the paths
option. It is not documented in browserify but in node-browser-resolve (used under the hood):
paths - require.paths array to use if nothing is found on the normal node_modules recursive walk