title: How to precompile handlebars templates using webpack?
body: <p>I have below webpack.config.js file:</p>
  
  <pre><code>const path = require('path');
  var webpack = require('webpack');
  var HandlebarsPlugin = require('precompile-handlebars');
  
  module.exports = {
  
        plugins: [
          new HandlebarsPlugin([
              {
                  inputDir: "src/main/resources/static/templates",
                  outputFile: "src/main/resources/static/js/compiled-templates.js"
              }
          ])
      ],
  }
  </code></pre>
  
  <p>package.json file:</p>
  
  <pre><code>{
    "name": "myapp",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "dev": "webpack --mode development",
       "build": "webpack --mode production"
    },
  
    "author": "",
    "license": "ISC",
  
  
    "devDependencies": {
      "precompile-handlebars": "^1.0.5",
      "webpack": "^4.6.0",
      "webpack-cli": "^2.1.2"
    }
  }
  </code></pre>
  
  <p>When  I do npm run dev or npm run build, it does not generate precompiled handlebar template. I am simply using webpack to precompile handlebars templates  and nothing else. How to fix this issue?   </p>