title: Webpack not compiling changes to code in React file automatically
body: <p>I recently started trying to use React along with Webpack to automatically compile changes when something is changed. However, despite me googling to my hearts content, I can not seem to find why it just won't work.</p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>import React from 'react'
  import ReactDOM from 'react-dom'
  import {Router, Route, Link} from 'react-router'
  import ProductList from './products'
  
  class Main extends React.Component {
      constructor(props){
          let products = [];
  
          super(props);
  
          this.state = {
              name: "Harry"
          };
      }
      render(){
          return(
              &lt;Storefront name={this.state.name} /&gt;
          );
      }
  }
  
  var a = 10;
  
  let Storefront = (props) =&gt;
  &lt;div className="container"&gt;
      &lt;h4&gt;Welcome to the React Store Front, {props.name}!&lt;/h4&gt;
      &lt;Link to="/products"&gt;View Products&lt;/Link&gt;
  &lt;/div&gt;;
  
  ReactDOM.render(
      &lt;Router&gt;
          &lt;Route path="/" component={Main}/&gt;
          &lt;Route path="/products" component={ProductList}/&gt;
      &lt;/Router&gt;,
      document.getElementById("app")
  );
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "static",
    "version": "1.0.0",
    "description": "",
    "main": "app.js",
    "dependencies": {
      "babel-preset-es2015": "^6.3.13",
      "babel-preset-react": "^6.3.13",
      "history": "^1.13.1",
      "react-router": "^1.0.2"
    },
    "devDependencies": {
      "babel-core": "^6.3.17",
      "babel-loader": "^6.2.0",
      "webpack": "^1.12.9",
      "webpack-dev-server": "^1.14.0"
    },
    "scripts": {
      "dev": "webpack-dev-server --inline --hot --progress --colors --port 8090",
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "",
    "license": "ISC",
    "private": true
  }
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>module.exports = {
      context: __dirname,
      entry: ['webpack/hot/dev-server', './app.js'],
      output: {
          filename: "app.js",
          path: __dirname + "/dist"
      },
      module: {
          loaders: [
              {
                  test: /\.js$/,
                  exclude: /node_modules/,
                  loaders: ["babel-loader?presets[]=react,presets[]=es2015"]
              },
              {
                  test: /\.jsx$/,
                  loaders: ['babel-loader?presets[]=react,presets[]=es2015']
              }
          ]
      },
      resolve: {
          extensions: ['', '.js', '.jsx']
      },
      watch: true
  };
  </code></pre>