app-module-path-node
app-module-path-node copied to clipboard
How about variables in paths?
How about configuring variables and using them in paths? That would be less dynamic and therefore has more of a chance of working in client-side settings, too. For example:
require('app-module-path').setVar('ROOT', __dirname);
var foo = require('$ROOT/src/foo');