{"library":"rollup-plugin-html-literals","title":"rollup-plugin-html-literals","description":"A Rollup plugin (v2.0.1) that minifies HTML in tagged template literals, specifically for lit-html and other HTML-in-JS libraries. Currently stable with active maintenance; released as a compatibility fix for newer Rollup versions (^2.x.x, ^3.x.x, ^4.x.x). Unlike rollup-plugin-minify-html-literals, this plugin supports Rollup v3+ and is written in TypeScript, providing type definitions. It relies on minify-literals under the hood and must run before transpilation. Ideal for reducing bundle size in LitElement or similar projects.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-html-literals"],"cli":null},"imports":["import template from 'rollup-plugin-html-literals'","const template = require('rollup-plugin-html-literals')","import template from 'rollup-plugin-html-literals'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import template from 'rollup-plugin-html-literals';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'esm'\n  },\n  plugins: [\n    template({\n      include: ['**/*.js'],\n      exclude: ['node_modules/**'],\n      failOnError: false,\n      options: {\n        minifyOptions: {\n          collapseWhitespace: true,\n          conservativeCollapse: true\n        }\n      }\n    })\n  ]\n};","lang":"typescript","description":"Basic Rollup config using the plugin to minify HTML template literals in all JS files, excluding node_modules.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}