title: Webpack.config how to just copy the index.html to the dist folder
body: <p>I am  trying to automate assets going into /dist. I have the following config.js:</p>
  <pre><code>module.exports = {
    context: __dirname + &quot;/lib&quot;,
    entry: {
      main: [
        &quot;./baa.ts&quot;
      ]
    },
    output: {
      path: __dirname + &quot;/dist&quot;,
      filename: &quot;foo.js&quot;
    },
    devtool: &quot;source-map&quot;,
    module: {
      loaders: [
        {
          test: /\.ts$/,
          loader: 'awesome-typescript-loader'
        },
        { test: /\.css$/, loader: &quot;style-loader!css-loader&quot; }
      ]
    },
    resolve: {
      // you can now require('file') instead of require('file.js')
      extensions: ['', '.js', '.json']
    }
  }
  </code></pre>
  <p>I also want to include main.html from the directory that sits next to /lib, into the /dist folder when running webpack. How can I do this?</p>
  <h1>UPDATE 1 2017_____________</h1>
  <p>My favourite way to do this now is to use the <a href="https://github.com/jantimon/html-webpack-plugin" rel="noreferrer"><code>html-webpack-plugin</code></a> with a template file. Thanks to the accepted answer too! The advantage of this way is that the index file will also have the cachbusted js link added out of the box!</p>