title: Error using partials with HTML Webpack Plugin
body: <p>I'm trying to create a setup with static HTML partials using the HTML Webpack Plugin, but running into some errors. This is my current config:</p>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>const webpack = require('webpack');
  const path = require('path');
  const ExtractTextWebpackPlugin = require('extract-text-webpack-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  const OptimizeCSSAssets = require('optimize-css-assets-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
      let config = {
    entry: './src/index.js',
    output: {
      path: path.resolve(__dirname, './public'),
      filename: 'app.js'
    },
    module: {
      loaders: [{
          test: /\.html$/,
          loader: 'html-loader'
      }],
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          loader: 'babel-loader'
        },
        {
          test: /\.scss$/,
          use: ['css-hot-loader'].concat(ExtractTextWebpackPlugin.extract({
            fallback: 'style-loader',
            use: ['css-loader', 'sass-loader', 'postcss-loader'],
          })),
        },
        {
          test: /\.(jpe?g|png|gif|svg)$/i,
          loaders: ['file-loader?context=src/assets/images/&amp;name=images/[path][name].[ext]', {
            loader: 'image-webpack-loader',
            query: {
              mozjpeg: {
                progressive: true,
              },
              gifsicle: {
                interlaced: false,
              },
              optipng: {
                optimizationLevel: 4,
              },
              pngquant: {
                quality: '75-90',
                speed: 3,
              },
            },
          }],
          exclude: /node_modules/,
          include: __dirname,
        },
      ]
    },
    plugins: [
      new HtmlWebpackPlugin({
          template: './src/template.html.ejs'
      }),
      new ExtractTextWebpackPlugin('main.css')
    ],
    devServer: {
      contentBase: path.resolve(__dirname, './public'),
      historyApiFallback: true,
      inline: true,
      open: true
    },
    devtool: 'eval-source-map'
  }
  
  module.exports = config;
  
  if (process.env.NODE_ENV === 'production') {
    module.exports.plugins.push(
      new webpack.optimize.UglifyJsPlugin(),
      new OptimizeCSSAssets()
    );
  }
  </code></pre>
  
  <p><strong>template.html.ejs</strong> (located under <code>./src</code>)</p>
  
  <pre><code>&lt;%=require('./header.html')%&gt;
    &lt;body&gt;
      testing schmesting
    &lt;/body&gt;
    &lt;%=require('./footer.html')%&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>(footer.html and header.html are located under <code>./src</code>)</p>
  
  <p><strong><em>Edit: Updated the code, still issues:</em></strong><br><br>
  "ERROR in   Error: Child compilation failed:
    Module parse failed: Unexpected token (1:0)
    You may need an appropriate loader to handle this file type.<br>  SyntaxError: Unexpected token (1:0)
    Module parse failed: Unexpected token (1:2)
    You may need an appropriate loader to handle this file type."</p>