title: Uncaught Error: Cannot find module "fs" when using webpack
body: <p>I'm using webpack + react + nodejs and this is my webpack config file:</p>
  
  <p>when I open website on the browser, It returns Uncaught Error: Cannot find module "fs" on the browser.</p>
  
  <pre><code>var webpack = require('webpack');
  
  var path = require('path');
  var ExtractTextPlugin = require('extract-text-webpack-plugin');
  
  module.exports = {
      entry: [
          'script-loader!./public/js/vendor/jquery.js',
          'script-loader!./public/js/vendor/foundation.min.js',
          'script-loader!./public/js/app.js',
          './view/app.jsx',
          './view/styles/main.scss'
      ],
      externals: {
          jquery: 'jQuery'
      },
      plugins: [
          new ExtractTextPlugin({
            filename: './public/styles/bundle.css',
            allChunks: true,
          }),
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery'
          })
      ],
      output: {
          path: __dirname,
          filename: './public/bundle.js'
      },
      resolve: {
          alias: {
              view: path.join(__dirname, 'view'),
              componentDir: path.join(__dirname, 'view/components/'),
              configureStore: path.resolve(__dirname, 'view/store/configureStore/'),
              actions: path.resolve(__dirname, 'view/actions/index/')
          },
          extensions: ['.js', '.jsx']
      },
      module: {
          rules: [
               ...
          ]
      }
  
  };
  </code></pre>
  
  <p>Where is the problem?</p>