I'm trying to use webpack in a truffle project. I follow this guide https://github.com/ConsenSys/truffle/wiki/Using-Truffle-and-Webpack-(beta).
At point 8 in my app.js I add this line:
var TestRPC = require("ethereumjs-testrpc");
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
web3 = new Web3(new web3.setProvider(TestRPC.provider()));
}
Unfortunately when i require ethereumjs-testrpc the Chrome console output: Uncaught Error: Cannot find module "fs".
I try to add in my webpack config: node: { console: true, fs: 'empty', net: 'empty', tls: 'empty' }
with no success.
Tks for help.