webpack-handlebars-precompiler

1.1.0 • Public • Published

webpack-handlebars-precompiler

A webpack plugin to precompile handlebars templates, partials and helpers into one concatenated file

Installation

npm i webpack-handlebars-precompiler --save-dev

Usage

Example

const HandlebarsPrecompiler = require('webpack-handlebars-precompiler');
 
module.exports = {
    ...
    plugins: [
        new HandlebarsPrecompiler({
            precompileOpts: {preventIndent: true},
            templatesPath: path.join(__dirname, 'templates'),
            templatesExt: '.hbs',
            helpersPath: path.join(__dirname, 'helpers'), // optional
            outputFile: path.join(__dirname, 'some/folder/bundle.js')
    })
  ]
  ...
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    111
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    111
  • 1.0.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i webpack-handlebars-precompiler

Weekly Downloads

111

Version

1.1.0

License

MIT

Last publish

Collaborators

  • dudagod