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
Updates the URLs for existing script (JS) and link (CSS) elements in an HTML template with URLs generated by Webpack
npm install replace-url-html-webpack-plugin
Typescript
Module System
Min. Node Version
Node Version
NPM Version
36.9
Supply Chain
49.6
Quality
65.2
Maintenance
50
Vulnerability
77.8
License
HTML Webpack Plugin v4 support and new GPL license!
Updated on May 21, 2020
Updated NPM dependencies to fix security vulnerabilities.
Updated on Apr 03, 2020
Updated NPM dependencies to fix security vulnerabilities.
Updated on Dec 10, 2019
Actually deploy JS files this time.
Updated on Oct 31, 2019
Updated NPM dependencies to fix security vulnerabilities.
Updated on Jul 16, 2019
Updated NPM dependencies to fix security vulnerabilities.
Updated on Jul 05, 2019
TypeScript (96.86%)
HTML (3.14%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
GPL-3.0 License
5 Stars
38 Commits
1 Forks
2 Watchers
17 Branches
1 Contributors
Updated on Jul 17, 2022
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
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
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
Found 0/26 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
38 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