Hello with RequireJS I can set a base path like this: base : \'./app/\'
so when I am in ./app/foo/bar/
for example and I have a script where I use
Use uRequire which provides a 'bridge' between nodejs require
and AMD define
modules, without reinventing the wheel (it is build on top of the two standards). It basically converts modules from AMD or commonJS format to the other format or UMD that runs smoothly on both nodejs & the browser.
It is also translating dependency paths with flexible path conventions, so you can have either '../../foo'
or 'bar/foo'
depending on which makes more sense at the point you are at.
Your AMD or UMD modules are loaded asynchronously on browser (using AMD/requireJs or other AMD loader) and on node the asynchronous require(['dep1', 'dep2'], function(dep1,dep2){...})
is also simulated.