esbuild-plugin-minify-html-literals
v2.0.1
Published
Minify HTML tagged template literals with esbuild
Downloads
3,348
Maintainers
Readme
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(),
],
});