2.0.0 • Published 27 days ago

esbuild-plugin-minify-html-literals v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
27 days ago

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:

NameAcceptsDefault
filterRegExp 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(),
  ],
});