Gathering detailed insights and metrics for static-version-injection-html-webpack-plugin
Gathering detailed insights and metrics for static-version-injection-html-webpack-plugin
Gathering detailed insights and metrics for static-version-injection-html-webpack-plugin
Gathering detailed insights and metrics for static-version-injection-html-webpack-plugin
npm install static-version-injection-html-webpack-plugin
Typescript
Module System
Node Version
NPM Version
68.8
Supply Chain
96.7
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,683
Last Day
2
Last Week
2
Last Month
14
Last Year
165
3 Stars
17 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
0.0.8
Package Id
static-version-injection-html-webpack-plugin@0.0.8
Size
7.65 kB
NPM Version
3.10.10
Node Version
6.10.3
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
-75%
2
Compared to previous week
Last month
600%
14
Compared to previous month
Last year
-30.4%
165
Compared to previous year
1
This plugin allows you to add a version string for each static asset in the output from html-webpack-plugin.
You must be running webpack on node 4.x or higher
Install the plugin with npm:
1$ npm install --save-dev static-version-injection-html-webpack-plugin
Require the plugin in your webpack config:
1var StaticVersionInjectionPlugin = require('static-version-injection-html-webpack-plugin');
Add the plugin to your webpack config as follows:
1plugins: [ 2 new HtmlWebpackPlugin(), 3 new StaticVersionInjectionPlugin({md5: true }) 4]
The available options are:
md5
: boolean
Specifying whether to use md5 version for all static assets or not.
Using HtmlWebpackIncludeAssetsPlugin
and CopyWebpackPlugin
to include assets to html-webpack-plugin
template :
1{ 2// ... 3output: { 4 filename: utils.assetsPath('js/[name].[chunkhash].js'), 5 // or 6 // filename: utils.assetsPath('js/[name].js') 7 8 } 9// ... 10plugins: [ 11 // extract css into its own file 12 new ExtractTextPlugin({ 13 filename: utils.assetsPath('css/[name].[contenthash].css') 14 // or 15 // filename: utils.assetsPath('css/[name].[contenthash].css') 16 17 }), 18 new HtmlWebpackPlugin(), 19 new StaticVersionInjectionPlugin() 20] 21}
User md5 mode :
1plugins: [ 2 new HtmlWebpackPlugin(), 3 new StaticVersionInjectionPlugin({ 4 md5: true 5 }) 6]
Then you will get html like this
1<!DOCTYPE html> 2<html> 3<head> 4 <meta charset=utf-8> 5 <title>test1</title> 6 <link href="/static/css/app.css?v=ce027eb1c4fdfea5bce4f5e466a381dd" rel=stylesheet> 7</head> 8 9<body> 10 <div id=app></div> 11 <script type=text/javascript src="/static/js/manifest.js?v=8072eace45064bc08e5f"></script> 12 <script type=text/javascript src="/static/js/vendor.js?v=5953645b5f4b4a670ad7"></script> 13 <script type=text/javascript src="/static/js/app.js?v=6b6c95749ad1049c0c72"></script> 14</body> 15</html>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
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
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-23
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