{"library":"rollup-plugin-posthtml-template","title":"rollup-plugin-posthtml-template","description":"A Rollup plugin that imports HTML files as strings and optionally transforms them with PostHTML. Version 1.3.0 is the latest stable release. It enables importing .html files directly in JavaScript, supports custom PostHTML plugins (e.g., posthtml-include), template interpolation, custom parsers (e.g., sugarml), and directives. Differentiators: lightweight, focuses on PostHTML integration for HTML transformations within Rollup builds, with first-class TypeScript support.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-posthtml-template"],"cli":null},"imports":["import posthtml from 'rollup-plugin-posthtml-template'","import type { RollupPostHTMLTemplateOptions } from 'rollup-plugin-posthtml-template'","import type { Plugin } from 'rollup'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport posthtml from 'rollup-plugin-posthtml-template';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'iife'\n  },\n  plugins: [\n    posthtml()\n  ]\n};\n\n// main.js\nimport hello from './hello.html';\ndocument.querySelector('#app').innerHTML = hello;\n\n// hello.html\n<p>Hello, World!</p>","lang":"javascript","description":"Configures Rollup to import HTML files as strings using the PostHTML plugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}