Gathering detailed insights and metrics for html-webpack-prefix-plugin
Gathering detailed insights and metrics for html-webpack-prefix-plugin
Gathering detailed insights and metrics for html-webpack-prefix-plugin
Gathering detailed insights and metrics for html-webpack-prefix-plugin
Prefix extension for the HTML-Webpack-Plugin for webpack 1.x
npm install html-webpack-prefix-plugin
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (93.11%)
HTML (6.89%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
17 Stars
21 Commits
5 Forks
1 Watchers
5 Branches
5 Contributors
Updated on Mar 04, 2023
Latest Version
1.1.0
Package Id
html-webpack-prefix-plugin@1.1.0
Size
33.09 kB
NPM Version
5.6.0
Node Version
8.11.1
Published on
Apr 13, 2018
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
Prefix extension for the HTML-Webpack-Plugin
Enhances html-webpack-plugin function by adding the options.
1{ 2 prefix: '//example.com/', 3 attrs : { 4 'img:src': false 5 } 6}
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.
You must be running webpack on node 6.x or higher
Install the plugin with npm:
1$ npm install html-webpack-prefix-plugin --save-dev
Add the plugin to your webpack config as follows:
1plugins: [ 2 new HtmlWebpackPlugin(), 3 new HtmlWebpackPrefixPlugin() 4]
The above configuration will actually do nothing due to the configuration defaults.
As soon as you now set prefix
to a path the generated output of the HtmlWebpackPlugin will always append prefix to matched attributes from HTML label.
1plugins: [ 2 new HtmlWebpackPlugin({ 3 prefix: '//example.com/' 4 }), 5 new HtmlWebpackPrefixPlugin() 6]
Even if you generate multiple files make sure that you add the HtmlWebpackPrefixPlugin only once:
1plugins: [ 2 new HtmlWebpackPlugin({ 3 prefix: '//example.com/' 4 }), 5 new HtmlWebpackPlugin({ 6 prefix: '//example.com/', 7 filename: 'demo.html' 8 }), 9 new HtmlWebpackPlugin({ 10 prefix: '//example.com/', 11 filename: 'test.html' 12 }), 13 new HtmlWebpackPrefixPlugin() 14]
The html-webpack-prefix-plugin had default prefix attributes options
If you want to remove and add attr you can set attributes options like so:
1new HtmlWebpackPlugin({ 2 prefix: '//example.com/', 3 attrs : { 4 'img:src': false, //remove from default option 5 'img:data-url': true // add new attribute to field 6 } 7})
If you only want to append attribute to default,
you can parse the Array to options like so:
1new HtmlWebpackPlugin({ 2 prefix: '//xxx.xxx.com/', 3 attrs : ['img:url'] 4})
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/15 approved changesets -- score normalized to 2
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
project is not fuzzed
Details
Reason
security policy file not detected
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
72 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