title: Webpack html output location
body: <p>I have webpack configured as below</p>
  
  <pre><code>const webdirectory = "../Application/Web"
  plugins: [
                  new HtmlWebpackPlugin({
                      inject: "body",
                      filename: `${webdirectory}/Views/Health/Index.cshtml`,
                      template: `${webdirectory}/Views/Health/Index_Template.cshtml`,
                      minify: false
                  }),
  
  output: {
                  // assets served by webpack-dev-server
                  path: path.resolve(__dirname, "IGNOREdevjunk/"),
                  publicPath: "https://localhost:8080/"
                },
  </code></pre>
  
  <p>I want webpack to generate the cshtml in the same folder as where it grabbed the template from. But what webpack does it grabs the template from the correct location, but when it saves the cshtml it completely messes up the output directory. What it is doing is grabbing the 'path' variable VALUE, which is 'Client' in this case , and then creating the cshtml in Client/IGNOREdevjunk/Application/Web/Views/Health/Index.cshtml</p>
  
  <p>How do I make it save the cshtml in the same folder as the template? When saving it is ignoring the relative paths.</p>
  
  <p>Directory structure</p>
  
  <pre><code>Parent
   - Application
   - - Web
   - - - Views
   - - - - Health
   - - - - - Index_template.cshtml
   - - - - - Index.cshtml (THIS IS WHERE I WANT THE CSHTML TO BE EMITTED)
   - Client
   - webpack.config.js
   - - IGNOREdevjunk
   - - - Application
   - - - - Web
   - - - - - Views
   - - - - - - Health
    - - - -  - - Index.cshtml (I DON'T WANT THIS SAVED HERE)
  </code></pre>