Socket
Socket
Sign inDemoInstall

esbuild-plugin-handlebars

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-handlebars

an esbuild plugin to handle ... handlebars!


Version published
Weekly downloads
2.3K
increased by24.07%
Maintainers
1
Weekly downloads
 
Created
Source

esbuild-plugin-handlebars

an esbuild plugin to handle ... handlebars!

Installation

yarn add -D esbuild-plugin-handlebars
# or
npm install -D esbuild-plugin-handlebars

Usage

const esbuild = require("esbuild");
const handlebarsPlugin = require("esbuild-plugin-handlebars");

esbuild
  .build({
    entryPoints: ["input.js"],
    outfile: "output.js",
    bundle: true,
    plugins: [handlebarsPlugin()],
  })
  .then((result) => console.log(result))
  .catch(() => process.exit(1));

You can also set additionalHelpers and precompileOptions:

const hbsOptions = {
  additionalHelpers: {},
  additionalPartials: {
    childTemplate: "./child.hbs",
  },
  precompileOptions: {},
};

// usual esbuild config
{
 ...
 plugins: [handlebarsPlugin(hbsOptions)],
 ...
}

Keywords

FAQs

Package last updated on 30 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc