npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-html-webpack-plugin

v1.0.1

Published

Lightweight fork / adaptation of html-webpack-plugin

Downloads

8

Readme

Simple HTML Webpack Plugin

This is a lightweight fork / adaptation of html-webpack-plugin. If you just randomly found this package / repository, you probably want to use html-webpack-plugin instead.

Basically the 2.x branch of html-webpack-plugin has some performance problems, particularly obvious in incremental builds, so I decided to make a bare bones version that only has what I need. It does however look like some of this will be fixed in 3.x, so hopefully this will be obsolete soon.

This plugin:

  • Loads a raw HTML file from disk
  • Inserts the configured chunks topologically sorted in the HTML. CSS in head, JS in body
  • Optionally minifies the HTML
  • Optionally appends a hash to the query string of the resource
  • Optionally always writes the resulting HTML to disk for use with webpack-dev-server (basically html-webpack-harddisk-plugin)

It does not:

  • Have support for plugins
  • Have support for templates
  • Generate HTML, it always uses a raw HTML file as template
  • Have all the nice extra options that html-webpack-plugin has

Installation

npm install simple-html-webpack-plugin --save-dev

Configuration

You can pass a hash of configuration options to SimpleHtmlWebpackPlugin. Allowed values are as follows:

  • template: [required] Path to the raw HTML template file.
  • chunks: string[] [required] Allows you to add only some chunks (e.g. only the unit-test chunk)
  • filename: The file to write the HTML to. Defaults to index.html.
  • minify: {...} | false Pass html-minifier's options as object to minify the output. Defaults to false.
  • hash: true | false if true then append a unique webpack compilation hash to all included scripts and CSS files. This is useful for cache busting. Defaults to false.
  • alwaysWriteToDisk: true | false if true saves the file on each emit. Useful when using webpack-dev-server. Default is false

Here is an example webpack config illustrating how to use these options:

var SimpleHtmlWebpackPlugin = require('simple-html-webpack-plugin');

var webpackConfig = {
  entry: {
    app: [ "index.js" ]
  },
  output: {
    path: path.resolve('dist'),
    filename: '[name].js'
  },
  plugins: [
    new SimpleHtmlWebpackPlugin({
      template: 'index.html',
      chunks: ['app'],
      alwaysWriteToDisk: true,
    })
  ]
}

License

This project is licensed under MIT.