Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via pnpm

html-webpack-plugin 5.6.0

Simplifies creation of HTML files to serve your webpack bundles
Package summary
Share
0
issues
5
licenses
33
MIT
8
BSD-2-Clause
1
ISC
2
other licenses
BSD-3-Clause
1
0BSD
1
Package created
13 Aug 2014
Version published
19 Dec 2023
Maintainers
5
Total deps
44
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
33 Packages, Including:
@jridgewell/gen-mapping@0.3.5
@jridgewell/resolve-uri@3.1.2
@jridgewell/set-array@1.2.1
@jridgewell/source-map@0.3.6
@jridgewell/sourcemap-codec@1.4.15
@jridgewell/trace-mapping@0.3.25
@types/html-minifier-terser@6.1.0
acorn@8.11.3
ansi-regex@5.0.1
buffer-from@1.1.2
camel-case@4.1.2
clean-css@5.3.3
commander@2.20.3
commander@8.3.0
dom-converter@0.2.0
dom-serializer@1.4.1
dot-case@3.0.4
he@1.2.0
html-minifier-terser@6.1.0
html-webpack-plugin@5.6.0
htmlparser2@6.1.0
lodash@4.17.21
lower-case@2.0.2
no-case@3.0.4
param-case@3.0.4
pascal-case@3.1.2
pretty-error@4.0.0
relateurl@0.2.7
renderkid@3.0.0
source-map-support@0.5.21
strip-ansi@6.0.1
tapable@2.2.1
utila@0.4.0

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
8 Packages, Including:
css-select@4.3.0
css-what@6.1.0
domelementtype@2.3.0
domhandler@4.3.1
domutils@2.8.0
entities@2.2.0
nth-check@2.1.1
terser@5.31.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
boolbase@1.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map@0.6.1

BSD Zero Clause License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
include-copyright
include-license
include-original
Cannot
hold-liable
Must
1 Packages, Including:
tslib@2.6.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of html-webpack-plugin 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@types/html-minifier-terser6.1.03.24 kBMIT
prod
html-minifier-terser6.1.027.49 kBMIT
prod
lodash4.17.21311.49 kBMIT
prod
pretty-error4.0.014.9 kBMIT
prod
tapable2.2.110.64 kBMIT
prod

Visualizations

Frequently Asked Questions

What does html-webpack-plugin do?

The html-webpack-plugin is a plugin in the webpack JavaScript module bundler that simplifies the creation of HTML files to serve your webpack bundles. This can be exceptionally useful, especially when it comes to webpack bundles that include a hash in the filename, which changes upon every compilation. The plugin allows you to either generate an HTML file, supply your own template using lodash templates, or use your own loader.

How do you use html-webpack-plugin?

To use the html-webpack-plugin, you must first add and install it to your project's dependencies. Depending on your webpack version, you can use either npm or yarn to install the plugin. After installation, you may use the plugin in your webpack configuration (webpack.config.js) file as follows:

const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin()
  ]
}

Upon execution, this will generate an HTML5 file that includes all your webpack bundles in the head using script tags.

If you need to generate more than one HTML file, you can declare the plugin more than once in your plugins array.

plugins: [
  new HtmlWebpackPlugin(), //Generates default index.html
  new HtmlWebpackPlugin({  // Generates a test.html
    filename: 'test.html',
    template: 'src/assets/test.html'
  })
]

The plugin also offers options for customization such as defining a title, filename, and template for the HTML document.

Where are the html-webpack-plugin docs?

The documentation for the html-webpack-plugin can be found at https://github.com/jantimon/html-webpack-plugin#readme. The documentation comprises of a detailed guide on how to install and use the plugin, options available for customization, how to write your templates, and plugin events.