title: Webpack Not Serving React Component
body: <p>I have created my webpack config file below:</p>
  
  <pre><code>const HtmlWebPackPlugin = require('html-webpack-plugin');
  
  module.exports = {
  entry: './src/main.js',
  output: {
      filename: 'bundle.js'
  },
  module: {
      rules: [
          {
              test: /\.js$/,
              exclude: '/node_modules/',
              use: [
                  {
                      loader: 'babel-loader'
                  }
              ]
          },
          {
              test: /\.html$/,
              use: [
                  {
                      loader: 'html-loader',
                      options: {minimize: true}
                  }
              ]
          }
      ]
  },
  plugins: [
      new HtmlWebPackPlugin({
          template: './src/index.html',
          filename: './index.html'
      })
  ]
  };
  </code></pre>
  
  <p>and added all the necessary packages <code>babel with env and react presets</code>. I have my <code>index.html</code> file and <code>TestComponent</code> like below:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;React 16 Webpack Setup&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script src="bundle.js" type="text/javascript"&gt;&lt;/script&gt;
  
      &lt;div id="test"&gt;
  
      &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and component code:</p>
  
  <pre><code>import React, { Component } from 'react';
  
  export default class TestComponent extends Component {
  render(){
      return (
          &lt;div&gt;
              &lt;h2&gt;React Setup&lt;/h2&gt;
          &lt;/div&gt;
      )
    }
  }
  </code></pre>
  
  <p>Here's my <code>main.js</code> file where I'm hosting the component:</p>
  
  <pre><code>import React from "react";
  import ReactDOM from "react-dom";
  import Test from './TestComponent';
  
  ReactDOM.render(&lt;Test/&gt;, document.getElementById("test"));
  </code></pre>
  
  <p>The problem is that when I run this script from <code>package.json</code>, I don't get any <code>output/dist</code> folder and also the component doesn't render in the browser. On which url do I have to visit to see the output just like with <code>create-react-app</code>?</p>