Minimum viable template for mini-html-webpack-plugin
Installations
npm install @vxna/mini-html-webpack-template
Developer
vxna
Developer Guide
Module System
CommonJS
Min. Node Version
>= 10
Typescript Support
No
Node Version
12.14.1
NPM Version
6.13.4
Statistics
12 Stars
41 Commits
2 Forks
2 Watching
1 Branches
2 Contributors
Updated on 02 Sept 2020
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
29,541,301
Last day
-8.6%
10,587
Compared to previous day
Last week
-5%
52,096
Compared to previous week
Last month
11.4%
232,411
Compared to previous month
Last year
-32.6%
3,346,224
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@vxna/mini-html-webpack-template
Template for mini-html-webpack-plugin that extends default features with useful subset of options
Warning
It does not work with html-webpack-plugin
Common usage
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}
Common options
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 |
Extended usage
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}
Extended options
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 |
Advanced minification
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}
Complex security features
SRI is out of scope of this project and it's recommended to use html-webpack-plugin with it's ecosystem tools.
Inspired by
License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vxna/mini-html-webpack-template/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vxna/mini-html-webpack-template/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/vxna/mini-html-webpack-template/ci.yml/master?enable=pin
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 3 are checked with a SAST tool
Reason
47 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
2.5
/10
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 MoreOther packages similar to @vxna/mini-html-webpack-template
@types/vxna__mini-html-webpack-template
TypeScript definitions for @vxna/mini-html-webpack-template
mini-css-extract-plugin
extracts CSS into separate files
mini-html-webpack-plugin
A miniature version of html-webpack-plugin with only necessary features
html-inline-css-webpack-plugin
☄️ A webpack plugin for convert external stylesheet to embedded stylesheet, aka document stylesheet