Gathering detailed insights and metrics for replace-url-html-webpack-plugin
Gathering detailed insights and metrics for replace-url-html-webpack-plugin
Gathering detailed insights and metrics for replace-url-html-webpack-plugin
Gathering detailed insights and metrics for replace-url-html-webpack-plugin
npm install replace-url-html-webpack-plugin
Typescript
Module System
Min. Node Version
Node Version
NPM Version
34.8
Supply Chain
49.6
Quality
65.3
Maintenance
50
Vulnerability
77.6
License
HTML Webpack Plugin v4 support and new GPL license!
Published on 21 May 2020
Updated NPM dependencies to fix security vulnerabilities.
Published on 03 Apr 2020
Updated NPM dependencies to fix security vulnerabilities.
Published on 10 Dec 2019
Actually deploy JS files this time.
Published on 31 Oct 2019
Updated NPM dependencies to fix security vulnerabilities.
Published on 16 Jul 2019
Updated NPM dependencies to fix security vulnerabilities.
Published on 05 Jul 2019
TypeScript (96.86%)
HTML (3.14%)
Total Downloads
41,081
Last Day
5
Last Week
11
Last Month
141
Last Year
2,494
5 Stars
38 Commits
1 Forks
3 Watching
17 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.1
Package Id
replace-url-html-webpack-plugin@2.0.1
Unpacked Size
46.65 kB
Size
15.63 kB
File Count
6
NPM Version
6.14.5
Node Version
14.3.0
Cumulative downloads
Total Downloads
Last day
25%
5
Compared to previous day
Last week
-73.2%
11
Compared to previous week
Last month
60.2%
141
Compared to previous month
Last year
-21.1%
2,494
Compared to previous year
2
This is an extension plugin for the webpack plugin html-webpack-plugin - a plugin that simplifies the creation of HTML files to serve your webpack bundles.
Typically, html-webpack-plugin injects <script>
and <link>
elements into generated HTML.
When used with a template, html-webpack-plugin will still inject new elements regardless of whether or not elements already exist for the assets.
This plugin will automatically update the URLs for existing <script>
and <link>
elements in an HTML template with URLs generated by Webpack.
It identifies existing elements by comparing their URLs with the generated output file name from Webpack. See Example section.
Webpack doesn't handle CSS resources natively. However, by using some of the following plugin combinations you can make them accessible to html-webpack-plugin:
Install the plugin as a development dependency using npm:
1$ npm install replace-url-html-webpack-plugin --save-dev
The plugin has no configuration. Simply, add the plugin to your webpack config as follows:
1{ 2 plugins: [ 3 new HtmlWebpackPlugin(), 4 new ReplaceUrlHtmlWebpackPlugin() 5 ] 6}
The order is important - the plugin must come after HtmlWebpackPlugin.
Consider the following HTML template:
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="UTF-8" /> 5 <title>Example</title> 6 <link type="text/css" rel="stylesheet" href="css/index.css" /> 7 <script async="async" src="js/bundle.js"></script> 8 </head> 9 <body> 10 ... 11 </body> 12</html>
If webpack is configured to generate the bundle with a hash included, then the URLs for both <script>
and <link>
will be replaced:
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="UTF-8" /> 5 <title>Example</title> 6 <link type="text/css" rel="stylesheet" href="css/index.abcdef0123456789.css" /> 7 <script async="async" src="js/bundle.abcdef0123456789.js"></script> 8 </head> 9 <body> 10 ... 11 </body> 12</html>
No vulnerabilities found.
Reason
no binaries found in the repo
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 0/26 approved changesets -- 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
34 existing vulnerabilities detected
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