title: Webpack ngTemplate-loader won't include my templates into the bundle: how to debug?
body: <p>I use webpack to build an angular project. My webpack configuration is copied from another project, where it works successfully.</p>
  
  <p>But in my project it won't include .html templates into the resulting javascript bundle.</p>
  
  <p>Here's the part of webpack configuration of interest:</p>
  
  <pre><code>const webpackConfig = {
      ...
      module: {
          ...
          plugins: [
              new HtmlWebpackPlugin({
                  inject: "body",
                  template: "app/index.html",
                  filename: "index.html"
               })
          ],
          loaders: [
              ...
              {
                  test: /\.html$/,
                  exclude: `${path.join(__dirname, "/app/index.html")}`,
                  loaders: [`ngtemplate?relativeTo=${path.join(__dirname, "/app")}`, "html"]
              }
          ]
      }
  }
  </code></pre>
  
  <p>The scaffold of my project is as follows:</p>
  
  <pre><code>├── app
  │   ├── app.js
  │   ├── components
  │   │   ├── auth
  │   │   │   ├── auth.module.js
  │   │   │   ├── auth.service.js
  │   │   │   └── user.service.js
  │   │   ├── footer
  │   │   │   └── footer.html
  │   │   ├── header
  │   │   │   └── header.html
  │   │   ├── home
  │   │   │   ├── home.html
  │   │   │   └── home.module.js
  │   │   ├── navigation
  │   │   │   └── navigation.html
  │   │   ├── right_sidebar
  │   │   │   └── right_sidebar.html
  │   │   └── util
  │   │       ├── util.module.js
  │   │       └── util.service.js
  │   ├── index.html
  │   └── shared
  ├── assets
  ├── package.json
  ├── gulpfile.js
  └── webpack.config.js
  </code></pre>
  
  <p>In <code>index.html</code> I say:</p>
  
  <pre><code>&lt;div id="header" ng-include="'/components/header/header.html'"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and header template is not included in the resulting <code>app.&lt;hash&gt;.js</code> bundle. How to debug this?</p>