title: Webpack cannot resolve package of babel core
body: <p>I am trying to incorporate webpack into my electron project to enable hot reloading. I started with a simp[le webpack configuration to pack dependencies in a bundle. My configuration is :</p>
  
  <pre><code>'use strict';
  
  const path = require('path');    
  
  let config = {
    target:'electron',
    entry:'./app/Initializer',
    output:{
      path:path.resolve(__dirname, 'dist'),
      filename: 'appbundle.js',
      publicPath:'/dist/'
    },
    resolve: {
      extensions:["",".js",".jsx"]
    },
    module: {
      loaders:[{
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel'
      },
        {
          test: /\.json/,
          loader: 'json-loader'
        }
      ],
    },
  }
  
  module.exports = config;
  </code></pre>
  
  <p>However, this throws the following error:</p>
  
  <pre><code>ERROR in ./~/babel-core/lib/api/node.js
  Module not found: Error: Cannot resolve 'file' or 'directory' ../../package in /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/lib/api
  resolve file
    /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package doesn't exist
    /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package.js doesn't exist
    /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package.jsx doesn't exist
  resolve directory
    /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package doesn't exist (directory default file)
    /home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package/package.json doesn't exist (directory description file)
  [/home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package]
  [/home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package.js]
  [/home/shashi/projects/kaal-clients/atman-desktop/node_modules/babel-core/package.jsx]
   @ ./~/babel-core/lib/api/node.js 42:15-39
  </code></pre>
  
  <p>The babel-core does have a valid package.json file, thus I am not sure why this error is being thrown. </p>