title: Module not found: Error: Cannot resolve module 'module'
body: <p>I want to load module from variable string</p>
  
  <pre><code>var abc = './../containers/BlankContainer';
  require(abc);
  </code></pre>
  
  <p>but it cannot find module, so I install 'require-from-string' module from npm.
  Now when I build it's giving error </p>
  
  <p><code>ERROR in ./~/require-from-string/index.js
  Module not found: Error: Cannot resolve module 'module' in D:\Nilay\RnD\node_modules\require-from-string
   @ ./~/require-from-string/index.js 3:13-30</code></p>
  
  <p>I found it is webpack issue, here is my webpack config:</p>
  
  <pre><code>const webpack = require('webpack');
  const path = require('path');
  const ExtractTextPlugin = require('extract-text-webpack-plugin')
  var entry = [path.resolve(__dirname, 'app/bootstrap.js')];
  var output = {
    path: path.resolve(__dirname, 'public/dist'),
    filename: 'bundle-[name].js',
    publicPath: "dist/"
  };
  
  var modules = {
    loaders: [
      { test: /\.json$/, loader: "json-loader" },
      { test: /\.js$/, 
  loader: ['babel-loader'], exclude: /node_modules/, query: { cacheDirectory: 'babel_cache', presets: ['react', 'es2015'] } },
      { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!autoprefixer-loader") },
      { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file-loader" },
      { test: /\.(woff|woff2)$/, loader: "file-loader" },
      { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "file-loader" },
      { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "file-loader" }
    ]
  };
  
  var plugins = [
    new ExtractTextPlugin("bundle.css"),
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
    }),
    new webpack.ProvidePlugin({
      jQuery: 'jquery',
      $: 'jquery',
      jquery: 'jquery'
    }),
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.optimize.UglifyJsPlugin({ // minimize/compress all js chunks
      compress: { warnings: false },
      mangle: false,
      sourcemap: false,
      beautify: false,
      dead_code: true
    })
  ]
  
  module.exports = {
    entry: entry,
    output: output,
    stats: { colors: true },
    watch: true,
    module: modules,
    plugins: plugins,
    resolveLoader: {
      root: path.join(__dirname, 'node_modules')
    },
    resolve: {
      modules: [path.resolve(__dirname, '/app/routes'), 'node_modules/'],
      descriptionFiles: ['package.json'],
      extensions: ['', '.js', '.ts']
    }
  };
  </code></pre>
  
  <p>How can I resolve it?</p>