Closed dilipkumar2k6 closed 8 years ago
Yep, this module is not meant to work on the client side.
I'm also using Browserify mostly just to pack modules for a CLI tool I'm working on.
I found a workaround after digging through an issue and a blame.
Here's how I was able to get it to compile, although I think I'll just fork it and remove the electron support.
npm install --save-dev electron-prebuilt
2.. Modify resolve.js
remote require to var remote = require('electron-prebuilt').remote;
After doing this I could successfully pack my build. Hope it helps.
I believe you can also just tell browserify to ignore the module
module. Since that chunk of code will never get hit, it should be fine.
That makes a lot of sense. Thanks!
I am using Angularjs 1.x and commonjs and compiling using webpack. Since my compiled js file serve on browser therefore it has to be as small as possible. I thought to use app-root-path module for my client side as well however i realized that it throws error in webpack compilation because "resolve.js" is doing require("module"). And when I installed "module" node package then it included big files and also throws error in browser console.
I am not expecting to solve this issue. However wanted to share that due to this issue i can't use it for client side module bundling.