A Rollup plugin that minifies and compresses tagged template literals for FAST Element (FAST) HTML and CSS templates. Version 1.0.3 is current and stable. It uses html-minifier-terser for HTML templates and a custom CSS minifier that removes whitespace and comments. Key differentiators: supports html, css, css.partial, and html.partial() tagged templates; allows disabling compression per type; accepts custom minification functions; designed specifically for FAST Element projects. Use after TypeScript transpilation to avoid breaking template expressions.
npm install rollup-plugin-fast-tagged-templatesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Rollup with TypeScript transpilation and FAST tagged template compression. Shows how to set minifyHTMLOptions and disable CSS minification.
Ensure fastTaggedTemplates() comes after @rollup/plugin-typescript or rollup-plugin-esbuild.
Set esbuild's minify option to false and use @rollup/plugin-terser for final minification.
To keep a comment, wrap it in an expression: ${/* comment */''}Use import syntax; if your project is CJS, consider dynamic import().
Change to: import fastTaggedTemplates from 'rollup-plugin-fast-tagged-templates'
Use dynamic import: const fastTaggedTemplates = await import('rollup-plugin-fast-tagged-templates') or switch to ES modules.Ensure fastTaggedTemplates() is listed after @rollup/plugin-typescript or rollup-plugin-esbuild in the plugins array.