Thursday, 25 May 2017

browserify ignore relative file

I am using browserify to create a client version of my api written for node. As there is client/node specific implementation, I would like to remove what is node specific.

I am running

browserify client.js -i ./nodeImpl.js > dist/index.js

Where ./nodeImpl.js is the node specific implementation in js.

However if I check the bundled file (dist/index.js) nodeImpl.js still contains what it originally had, it did not get replaced with {}

I tried relative path ./nodeImpl.js, as well as full relative path from the current directory from where the browserify script gets called

Any ideeas?



via patentul

No comments:

Post a Comment