lit-html-minifier-loader

JSON →
library 1.0.0 ·javascript
verified Jun 4, 2026

A webpack loader that minifies HTML templates inside JavaScript/TypeScript template string literals used by lit-html and similar libraries. Version 1.0.0 is the initial stable release. It is designed to be chained after a TypeScript or JavaScript loader to reduce the size of tagged template literals containing HTML. The loader processes .ts or .js files, minifying the HTML content within template literals using HTML minification techniques. It supports optional debug mode and integrates seamlessly into webpack builds. Compared to alternatives like babel-plugin-template-html-minifier, this works as a webpack loader and is easier to set up in webpack projects.