# Integrations

The following packages integrate Handlebars in different environments. These packages are not officially supported by the Handlebars team.

There are multiple webpack-plugins that allow you to use Handlebars in a Webpack environment.

# Webpack: handlebars-loader

The handlebars-loader allow you to import precompiled template. Just write your handlebars-template into a template.handlebars-file and import it using

const compiledTemplate = require("./template.handlebars");

or

import compiledTemplate from "./template.handlebars";

# Webpack: handlebars-webpack-plugin

The handlebars-webpack-plugin uses Handlebars to build your HTML-pages statically when compiling your application

# Babel: handlebars-inline-precompile

The babel-plugin-handlebars-inline-precompile precompiles Handlebars templates that are provided as template literals in the JavaScript source code:

import hbs from "handlebars-inline-precompile";
const compiledTemplate = hbs`{{name}}`;

Please refer to the documentation of the package for setup instructions.

# Browserify: hbsfy

The hbsfy package allows you to import precompiled templates in a browserify environment:

const compiledTemplate = require("./template.handlebars");

# Parcel: parcel-plugin-handlebars

There is an old plugin for parcel: https://www.npmjs.com/package/parcel-plugin-handlebars

But you should use one of the many forks of this package, which are more up-to-date: https://www.npmjs.com/search?q=parcel-plugin-handlebars

The most recent one is: https://www.npmjs.com/package/@inventory/parcel-plugin-handlebars

# Parcel: parcel-plugin-handlebars-precompile

TODO: Write text here

https://www.npmjs.com/package/parcel-plugin-handlebars-precompile

Last Updated: 6/18/2020, 7:00:46 PM