Gathering detailed insights and metrics for rollup-plugin-minify-html-literals-cjs-rollup3
Gathering detailed insights and metrics for rollup-plugin-minify-html-literals-cjs-rollup3
Gathering detailed insights and metrics for rollup-plugin-minify-html-literals-cjs-rollup3
Gathering detailed insights and metrics for rollup-plugin-minify-html-literals-cjs-rollup3
Rollup plugin to minify HTML template literal strings
npm install rollup-plugin-minify-html-literals-cjs-rollup3
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
66 Stars
46 Commits
9 Forks
2 Watchers
1 Branches
3 Contributors
Updated on Apr 18, 2025
Latest Version
1.0.0
Package Id
rollup-plugin-minify-html-literals-cjs-rollup3@1.0.0
Unpacked Size
15.08 kB
Size
4.88 kB
File Count
8
NPM Version
8.19.2
Node Version
18.12.1
Published on
May 23, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Uses minify-html-literals to minify HTML and CSS markup inside JavaScript template literal strings.
1import babel from 'rollup-plugin-babel'; 2import minifyHTML from 'rollup-plugin-minify-html-literals'; 3import { uglify } from 'rollup-plugin-uglify'; 4 5export default { 6 entry: 'index.js', 7 dest: 'dist/index.js', 8 plugins: [ 9 minifyHTML(), 10 // Order plugin before transpilers and other minifiers 11 babel(), 12 uglify() 13 ] 14};
By default, this will minify any tagged template literal string whose tag contains "html" or "css" (case insensitive). Additional options may be specified to control what templates should be minified.
1export default { 2 entry: 'index.js', 3 dest: 'dist/index.js', 4 plugins: [ 5 minifyHTML({ 6 // minimatch of files to minify 7 include: [], 8 // minimatch of files not to minify 9 exclude: [], 10 // set to `true` to abort bundling on a minification error 11 failOnError: false, 12 // minify-html-literals options 13 // https://www.npmjs.com/package/minify-html-literals#options 14 options: null, 15 16 // Advanced Options 17 // Override minify-html-literals function 18 minifyHTMLLiterals: null, 19 // Override rollup-pluginutils filter from include/exclude 20 filter: null 21 }) 22 ] 23};
1import minifyHTML from 'rollup-plugin-minify-html-literals'; 2import { defaultShouldMinify } from 'minify-html-literals'; 3 4export default { 5 entry: 'index.js', 6 dest: 'dist/index.js', 7 plugins: [ 8 minifyHTML({ 9 options: { 10 shouldMinify(template) { 11 return ( 12 defaultShouldMinify(template) || 13 template.parts.some(part => { 14 // Matches Polymer templates that are not tagged 15 return ( 16 part.text.includes('<style') || 17 part.text.includes('<dom-module') 18 ); 19 }) 20 ); 21 } 22 } 23 }) 24 ] 25};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
41 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More