Does this work in the browser? Or with browserify/webpack?
Closed this issue · 3 comments
Hey there, just wondering if this module (or any of the ones lke it) works in the browser or with browserify/webpack compilation?
Hi! As far as I'm aware, it won't work in browserify/webpack, as neither of those two provide any kind of virtual file system for us to load modules from. They only function with static require
statements, where the full string is available in the source. i.e. they only work with require('./lib/file')
and they won't even work with something as simple as require('./lib' + '/file')
.
@dougwilson Hmm thanks for the info. Do you have any browserify/webpack compatible alternatives you'd recommend?
Unfortunately I only do backend work and have never used browserify/webpack, so have no idea. You may want to ask in those communities. If you find one, let me know and I can mention it on the readme.