Gathering detailed insights and metrics for @vxna/mini-html-webpack-template
Gathering detailed insights and metrics for @vxna/mini-html-webpack-template
Gathering detailed insights and metrics for @vxna/mini-html-webpack-template
Gathering detailed insights and metrics for @vxna/mini-html-webpack-template
Minimum viable template for mini-html-webpack-plugin
npm install @vxna/mini-html-webpack-template
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
12 Stars
41 Commits
2 Forks
2 Watching
1 Branches
2 Contributors
Updated on 02 Sept 2020
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
8.3%
10,371
Compared to previous day
Last week
-1%
52,894
Compared to previous week
Last month
6.4%
232,214
Compared to previous month
Last year
-32.6%
3,340,177
Compared to previous year
Template for mini-html-webpack-plugin that extends default features with useful subset of options
It does not work with html-webpack-plugin
webpack.config.js
1const MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin') 2 3module.exports = { 4 plugins: [ 5 new MiniHtmlWebpackPlugin({ 6 context: { 7 title: 'common-usage', 8 favicon: 'https://assets-cdn.github.com/favicon.ico', 9 container: 'root', 10 trimWhitespace: true, 11 }, 12 template: require('@vxna/mini-html-webpack-template'), 13 }), 14 ], 15}
Name | Type | Default | Description |
---|---|---|---|
lang | {String} | undefined | Set document language |
title | {String} | 'sample-app' | Set document title |
favicon | {String} | undefined | Set document favicon |
container | {String} | undefined | Set application mount point |
trimWhitespace | {Boolean} | undefined | Safe document whitespace reduction |
webpack.config.js
1const MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin') 2 3module.exports = { 4 plugins: [ 5 new MiniHtmlWebpackPlugin({ 6 context: { 7 title: 'extended-usage', 8 head: { 9 meta: [ 10 { 11 name: 'description', 12 content: 'mini-html-webpack-template', 13 }, 14 ], 15 }, 16 body: { 17 raw: '<div id="root"></div>', 18 }, 19 attrs: { 20 js: { 21 async: '', 22 type: 'text/javascript', 23 }, 24 }, 25 }, 26 template: require('@vxna/mini-html-webpack-template'), 27 }), 28 ], 29}
Name | Type | Default | Description |
---|---|---|---|
head.meta | {Array} | undefined | Array of objects with key + value pairs |
head.links | {Array} | undefined | Array of objects with key + value pairs |
head.scripts | {Array} | undefined | Array of objects with key + value pairs |
head.raw | {Array|String} | undefined | Generates raw document markup |
body.scripts | {Array} | undefined | Array of objects with key + value pairs |
body.raw | {Array|String} | undefined | Generates raw document markup |
attrs.js | {Object} | undefined | Applies html attributes to webpack output |
attrs.css | {Object} | undefined | Applies html attributes to webpack output |
For custom needs html-minifier middleware and all of it's options could be used
webpack.config.js
1const { minify } = require('html-minifier') 2const MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin') 3 4module.exports = { 5 plugins: [ 6 new MiniHtmlWebpackPlugin({ 7 context: { 8 title: 'advanced-minification', 9 }, 10 template: (ctx) => 11 minify(require('@vxna/mini-html-webpack-template')(ctx), { 12 collapseWhitespace: true, 13 minifyCSS: true, 14 minifyJS: true, 15 }), 16 }), 17 ], 18}
SRI is out of scope of this project and it's recommended to use html-webpack-plugin with it's ecosystem tools.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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