I'm trying to create one API bundle with browserify that works within node env as well as browser env. This should be not too complex? I was planning to use the fetch API to simplify stuff.
I noticed this project decides compile time whether to use a node/browserify or other implementation to tune some small things. Is it possible to decide this runtime to make it possible to really create one (UMD) bundle to use on node and browser invironments or does this look like a stupid idea?
I would be worried about combining the server side and client side code in client side bundles. (Which would make the JavaScript bigger and the web page slower). I'm also not sure how this might be useful…
Hello,
I'm trying to create one API bundle with browserify that works within node env as well as browser env. This should be not too complex? I was planning to use the fetch API to simplify stuff.
I noticed this project decides compile time whether to use a node/browserify or other implementation to tune some small things. Is it possible to decide this runtime to make it possible to really create one (UMD) bundle to use on node and browser invironments or does this look like a stupid idea?
Thanks,
Daniel.