calvinmetcalf / rollup-plugin-node-builtins

137 stars 40 forks source link

mock for fs and net? #21

Open SupremeTechnopriest opened 7 years ago

SupremeTechnopriest commented 7 years ago

Could we add some mocks for libraries like fs and net? Here is how browserify does it https://github.com/substack/node-browserify/blob/master/lib/builtins.js#L12

SupremeTechnopriest commented 7 years ago

we can use https://www.npmjs.com/package/browserify-fs for fs like you do here for crypto https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/master/src/index.js#L35

SupremeTechnopriest commented 7 years ago

working on a pr now

calvinmetcalf commented 7 years ago

the mocks yes!, browserify fs um lets not do that by default, that's a whole lot of stuff there

SupremeTechnopriest commented 7 years ago

Yeah I was actually thinking of making process an option as well. Im having problems with it looking for global in the browser. Checking to see if upgrading the packages fixes the issue first.

SupremeTechnopriest commented 7 years ago

@calvinmetcalf https://github.com/calvinmetcalf/rollup-plugin-node-builtins/pull/22 submitted

calvinmetcalf commented 7 years ago

Yeah I was actually thinking of making process an option as well. Im having problems with it looking for global in the browser. Checking to see if upgrading the packages fixes the issue first.

check the readme process needs the globals shim

SupremeTechnopriest commented 7 years ago

submitted #23