esbuild-plugin-minify-html-literals
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

esbuild-plugin-minify-html-literals

ESBuild plugin to minify HTML syntax in JavaScript tagged-template literals. It's a thin wrapper around @asyncLiz' superlative minify-html-literals.

The "Lit" stands for "Literal"

You can use it to build your lit-html, hybrids, FAST, htm, etc. projects for production

Options

The same as minify-html-literals, with the following additions:

Name Accepts Default
filter RegExp of file names to apply to /\.[jt]s$/

Usage

import esbuild from 'esbuild';
import { minifyHTMLLiteralsPlugin } from 'esbuild-plugin-minify-html-literals';

await esbuild.build({
  ...theRestOfYourConfig,
  plugins: [
    minifyHTMLLiteralsPlugin(),
  ],
});

Package Sidebar

Install

npm i esbuild-plugin-minify-html-literals

Weekly Downloads

1,398

Version

2.0.0

License

ISC

Unpacked Size

9.1 MB

Total Files

5

Last publish

Collaborators

  • bennyp