I am having no problem with browserification, by the way my module is super simple. Like this:
//sum.js
module.exports = function(a, b){
return a + b;
}
So I use the command browserify -r ./sum | uglifyjs -c -m --output sum.min.js
and everything is ok.
If I copy paste the results in chromes console, the only way I can retrieve the sum module is by doing var sum = require("./sum")
which I believe is not that friedly.
I would be happy if I could just var sum = require("sum")
(without the './' part).
Is it possible? I cant seem to find anything on browserify docs.