- src
- main.js
- ui
- foo.js
- bar.js
This command generates modules where identifiers have been set to absolute module paths:
browserify ./src/**/*.js -o ./dist/bundle.js --full-paths
Resulting module id:
"/Users/rikschennink/.../src/ui/foo.js"
Is there a way to make those module paths relative? If I omit the --full-paths
command I'm left with indexes as module identifiers so that's not working.
I want to bundle all modules but still be able to reference them with require by path like this.
var module = require('/ui/foo');
I'm aware I can alias the modules but that would require aliasing every single module manually which is not really a workable solution.