Installations
npm install replace-url-html-webpack-plugin
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6.11.5
Node Version
14.3.0
NPM Version
6.14.5
Score
34.8
Supply Chain
49.6
Quality
65.3
Maintenance
50
Vulnerability
77.6
License
Releases
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
Contributors
Unable to fetch Contributors
Languages
TypeScript (96.86%)
HTML (3.14%)
Developer
BTOdell
Download Statistics
Total Downloads
41,081
Last Day
5
Last Week
11
Last Month
141
Last Year
2,494
GitHub Statistics
5 Stars
38 Commits
1 Forks
3 Watching
17 Branches
1 Contributors
Bundle Size
1.67 kB
Minified
894.00 B
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
41,081
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
URL replacement for HTML Webpack Plugin
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:
- copy-webpack-plugin (npm) (github),
html-webpack-include-assets-plugin (npm) (github) - extract-text-webpack-plugin (npm) (github) (warning: untested)
Environment
- node >= 6.11.5
Peer Dependencies
Installation
Install the plugin as a development dependency using npm:
1$ npm install replace-url-html-webpack-plugin --save-dev
Basic Usage
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.
Example
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
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0
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
- 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 4 are checked with a SAST tool
Reason
34 existing vulnerabilities detected
Details
- 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-w573-4hg7-7wgq
- 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-qqgx-2p2h-9c37
- 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-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-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/10
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