{"library":"rollup-plugin-minify-html-literals","title":"rollup-plugin-minify-html-literals","description":"Rollup plugin that minifies HTML and CSS content inside JavaScript template literal strings. Version 1.2.6 is current and stable. It leverages the minify-html-literals library to process tagged templates (e.g., lit-html) and untagged templates (e.g., Polymer). Key differentiators: seamless Rollup integration, support for include/exclude patterns, fail-on-error mode, and the ability to customize the minification logic. Typical use cases: reducing bundle size for Web Component projects using lit-html or Polymer.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-minify-html-literals"],"cli":null},"imports":["import minifyHTML from 'rollup-plugin-minify-html-literals'","const minifyHTML = require('rollup-plugin-minify-html-literals')","import type { Options } from 'rollup-plugin-minify-html-literals'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import minifyHTML from 'rollup-plugin-minify-html-literals';\n\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/bundle.js', format: 'iife' },\n  plugins: [\n    minifyHTML({\n      include: 'src/**/*.js',\n      options: {\n        shouldMinify: (template) => {\n          return template.parts.some(p => p.text.includes('<style') || p.text.includes('<dom-module'));\n        }\n      }\n    })\n  ]\n};","lang":"javascript","description":"Rollup configuration demonstrating how to use the plugin with include option and custom shouldMinify for Polymer templates.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}